NURAZIM.
OS
EN
English Русский Кыргызча
← Back to exhibition
Project notes

Tic Tac Toe.

A multiplayer take on the three-by-three board game, with private rooms, quick matches and a computer opponent.

Tic Tac Toe

The React client and the Express server share one TypeScript rules engine. The server checks each move before broadcasting the new board over Socket.IO. Private rooms and the matchmaking queue live in memory, so restarting the server ends those sessions.

React / TypeScript / Vite / Express / Socket.IO

Development status · Public repository ·

Source code ↗

Live Preview

Preview status: ready · vite + react (Demo Adapter) · Demo Mode · Synthetic Data

Interactive frontend demonstration implementing the verified shared Tic Tac Toe rules from nurazim-dev/game-1v1 with an offline bot and mocked room matchmaking.

Screenshots

Tic Tac Toe Screenshots

Code & architecture

shared/src/index.ts ↗ typescript

Shared board setup and outcome checks.

export const WIN_LINES = [[0,1,2],[3,4,5],[6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]] as const;
export function initializeGame(): GameState { return {board:Array(9).fill(null),currentPlayer:'X',status:'playing',winner:null,winningLine:[],moves:0}; }
export function checkWinner(board:(Mark|null)[]): {winner:Mark;line:number[]}|null { for(const line of WIN_LINES){const [a,b,c]=line;if(board[a] && board[a]===board[b]&&board[a]===board[c])return {winner:board[a] as Mark,line:[a,b,c]};}return null; }
export function checkDraw(board:(Mark|null)[]):boolean{return board.every(Boolean)&&!checkWinner(board);}
export function getAvailableMoves(board:(Mark|null)[]):number[]{return board.flatMap((v,i)=>v===null?[i]:[]);}
Command Palette
NURAZIM SHELL · Type help, whoami, projects, os
/home/nurazim $