On an internal hack day, your team is tasked with creating a classic game, 'Parallax Tic-Tac-Toe'. Your team has decided to split in half, with half of the team diving straight into coding a proof-of-concept, and the other half planning it out. You're in the planning group.
Task: Using the whiteboard, plan how you would build the game, discussing your thinking with us as you go. Feel free to write pseudo code.
- The game will have 2 players: X and O
- The game is played on a 3x3 grid
- Players take turns clicking on an empty cell to place their mark
- A player wins if they have three of their marks in a horizontal, vertical, or diagonal row
- If all cells are filled and no player has three marks in a row, the game is a draw
- The UI must clearly indicate the current player's turn
- The UI must clearly indicate the winner or if the game is a draw
- A "Reset Game" button must allow starting a new game at any time
Extra notes:
- X always starts the game by default
- Create a
<Status />component to display the current player, winner, or draw state. - Interactive 3x3 grid using React and Tailwind CSS. UI polish is secondary to correctness.
- Turn management logic ensuring players cannot play out of turn or on occupied cells.
- Win and Draw detection logic.
- Once a game is complete, the UI must show the result and prevent further moves.
Planning is done, you have a good feel for the game's mechanics. Your colleague has made some excellent progress.
Task: Use your knowledge of the game to review your colleague's code and help them finish it off, without using AI.
Note: Whilst you can't use AI generative coding, you can still use search engines at any time.
Use AI to finish the project and discuss AI's changes with us.
Note: First 10 minutes with just Copilot, then full use of AI after that.
If you have time, choose from the following features to implement using AI:
- Add a score counter for Player X and Player O that persists across resets
- Add a "Undo Last Move" button
- Randomizer button to select who has the first turn
- Add a simple AI opponent for single-player mode
- Revert back to any move in the game using a move history list
