Coding DinerHave a cup of joe!
ExerciseEasy

Implement frontend tic-tac-toe

frontend
Prompt

Build a tic-tac-toe game in a frontend framework of your choosing. It must include tho following

Basic requirements:

  • A 3x3 board, click to place X or O on the current player's turn
  • Display whose turn it is
  • Detect and display a winner, or declare a draw. The winning squares should be highlighted
  • A reset button

Extended requirements:

  • Include an "undo" button that lets the player go back to the previous turn
  • Store the results in localstorage, so the game is populated on a refresh

Considerations:

  • How do you expect to divide up the state? (player turn, game, etc.)?
  • How does shallow/deep copying of arrays potentially affect this exercise?

Your notes

Sign in to keep your own notes on this problem.

Sign in