How janalihassan/tic_tac_toe-multiplayer- works
This repository is documented as a Unity browser Tic Tac Toe game using PlayroomKit for two-player rooms and RPC synchronization. The documented workflow starts a room, assigns player order and symbols, accepts valid cell clicks, synchronizes moves and turns, then declares and displays a winner. The README names game scripts under Assets/Script/, but those files are absent from the supplied tree; their paths are therefore left null. Internal SDK behavior is represented only at the documented entry point.
Main entry points: PlayroomKit.cs PlayroomKit SDK
Components 16
Game flow
- Game manager
- Two-player room
- Player order
- Symbol assignment
- Move validation
- SpawnShape RPC
- SyncTurn RPC
- Win detection
- GameOver RPC
Board and UI
- Board cells
- Turn indicator
- Winning line
- Win/lose display
- YOU label
PlayroomKit SDK
- PlayroomKit SDK
Assets/PlayroomKit/PlayroomKit.cs
Other components
- Browser players
Connections 17
- Browser players → Game manager: starts game
- Game manager → PlayroomKit SDK: starts SDK
- Game manager → Two-player room: creates room
- Two-player room → Browser players: admits players
- Game manager → Player order: sends join order
- Player order → Symbol assignment: assigns symbols
- Browser players → Board cells: clicks cell
- Board cells → Game manager: passes coordinates
- Game manager → Move validation: validates move
- Game manager → SpawnShape RPC: sends move
- Game manager → SyncTurn RPC: sends next turn
- SyncTurn RPC → Turn indicator: updates indicator
- Game manager → Win detection: checks winner
- Game manager → GameOver RPC: broadcasts result
- GameOver RPC → Winning line: provides winning cells
- GameOver RPC → Win/lose display: shows outcome
- Symbol assignment → YOU label: marks local symbol