Tic-Tac-Toe Project

Tic-Tac-Toe project

In this project, we will use our knowledge of 2D arrays in order to code a simple two player game of tic-tac-toe. To play, there is a board of 9 squares, and the goal is to have three in a row. Every turn, each player will be able to add a symbol (x or o) to the board.

Instructions

  1. At the beginning of the game, ask each player for their name.
  2. For every turn, display the current board
    1. Ask the player what row and what column they would like to add their symbol to
  3. If a player gets three in a row, declare them the winner and end the game
Full course
Next Lesson