1.

Design Tic-Tac-Toe game.

Answer»

Tic-tac-toe game involves two players where one player chooses 0 and the other player chooses X for MARKING the cells. The player who fills a row/column/diagonal with their SELECTED character wins.

  • What are some of the Required Features?
    • Support 2 player game where one player can be a computer.
    • Design algorithm to CALCULATE the win and loss results.
  • What are some of the common problems encountered?
    • What happens if both players play optimally?
    • How to decide the winning strategy?
  • Possible TIPS for consideration:
    • If one player is a computer, then make use of the rand() METHOD for ensuring moves are completely random.


Discussion

No Comment Found