Systems

BlitzTactoe

Real-time multiplayer tic-tac-toe with a five-second turn timer. Miss your window and you forfeit the move.

DjangoWebSocketsRedisJavaScript

BlitzTactoe is tic-tac-toe on a timer. Every move has a five-second countdown, and if you hesitate you lose the turn. Two players connect to a room, a three-second pre-game countdown starts once both sides ready up, and the board is live from there.

What it does

Stack

Architecture

Most of the logic is in game/consumers.py, an AsyncWebsocketConsumer that owns the game loop. In-memory dicts (GAMES, GAME_CONNECTIONS) give fast access during a match, while every state change gets mirrored to Redis under a game:{room_id} key. Per-room asyncio.Locks serialize moves so two clicks arriving in the same millisecond can’t both land. Input validation lives in game/validators.py. Room IDs, move indices, turn times, and game names all get checked before anything touches state.