A multiplayer Tic Tac Toe server built with Hono and Deno. The server automatically pairs players into games and manages game sessions until completion.
- Auto-pairing of players: no lobby or room selection
- Each pair of players is assigned a unique game session
- Turn-based gameplay managed completely on the server
- Game ends when a player wins or it's a draw
- Players are prompted to play again after each match
- A player visits the homepage.
- The player is prompted to enter their name.
- The server puts them into a "waiting queue".
- The player sees a "Waiting for opponent..." message.
- When another player joins, a game session is created, and the game starts.
- Player A visits the home page and enters their name ("Alice").
- Alice is told to wait for an opponent.
- Player B visits the site shortly after and enters their name ("Bob").
- The server matches Alice and Bob together.
- A new game session is created.
- Alice plays as
"X"and Bob plays as"O"(or vice versa). - They take turns making moves. The game proceeds until:
- A player wins → winner is announced.
- OR it ends in a draw → draw is announced.
- Both players are shown a message asking if they’d like to play again.
- If they choose yes, they are put back into the waiting queue.
- If not, they leave the game.
deno task start