Day 4 - Tic-Tac-Toe II

April 30-Day Coding Challenge

April 30d Coding Challenge > Tic-Tac-Toe II

Day 4 - Tic-Tac-Toe II

TTT is a two player game with a 3x3 grid. First player picks an open square and puts a X, the second player draws an O. Players take turns till one of the players wins (gets the of the marks in a row). Game is a draw when all 9 squares are filled up without a winner.

Write a program where computer can play the game with a user.

Hint: Simple logic, see if computer can win, see if computer can block, play srategic, play random. Consider using MINMAX algorithm.

To Discuss more and follow up, join us at SDE Skills Discord Server, use the #women-in-tech channel.

How to submit your code

  1. Head over to repl.it
  2. create an account / log in.
  3. Code your submission and share it with user @sdeskills
  4. e-mail your submission to [email protected]

Note: While there is no submission deadline per-se, we recommend you answer these questions as soon as they are posted.

Day 4 - Tic-Tac-Toe II

Want the questions emailed?