Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 611 Bytes

L2_homework.md

File metadata and controls

18 lines (15 loc) · 611 Bytes

Homework: L2

Game 2 : Tic-Tac-Toe

Build your Tic-Tac-Toe game from Scratch. The function should:

  • Create a 3x3 game board
  • Allow Player 1 and Player 2 to play their turn.
  • At each turn, player will mark their position.
  • Evaluate the board after each move to check whether a row or column or a diagonal has the same player number.
  • If win, show won player. The game will draw if no one wins after 9 moves.

Game Flow Example:

  1. Create Empty Board
  2. Player 1 enter position
  3. Check Status
  4. Player 2 enter position
  5. Check Status
  6. Continue until there is a winner or it is a draw game.