About this tool
Play a responsive Tic-Tac-Toe game with score tracking, win detection, draw handling, and optional computer moves.
This Tic-Tac-Toe game keeps the 3x3 board as a nine-cell array in React state and checks it after every move against a fixed table of the 8 winning lines — 3 rows, 3 columns and 2 diagonals — highlighting whichever one completes and calling a draw when all nine cells are filled with no match. The computer opponent is deliberately simple rather than a minimax solver: "Easy" picks uniformly at random from the open cells, while "Medium" does a one-move lookahead, simulating each empty square to take its own winning move first, then block yours, then claim the centre square, and only falls back to random after that. Every move, the win check and the opponent's reply are computed in your browser after a short 420 ms pause, so nothing is sent to a server. There is no account, no download and no cost.
Open Tic-Tac-Toe Game on AltFTool — it loads instantly in your browser.
Pick a mode under Round settings: "Two players" for hot-seat on one device, or "Vs computer" to play X against the machine's O.
If you chose Vs computer, set Difficulty — "Easy: random moves" or "Medium: win and block". The selector stays disabled in two-player mode.
Click or tab to any of the nine cells to place your mark. The winning line highlights and the scoreboard updates, then use Restart Game for a new round or Reset Score to clear the tally.
Switch between hot-seat two-player and a computer opponent at any time; switching clears the board and starts a fresh round without touching the score.
Medium looks exactly one move ahead — win, block, take centre. There is no minimax search, so the computer is practice rather than a wall.
The board state, win detection and the opponent's moves are all computed client-side in React. No account, no install, and no move is sent to a server.
The nine cells are real buttons in an ARIA grid with per-cell labels and visible focus rings, and the winning-line pulse respects reduced-motion settings.
Get three of your marks in a straight line. On a 3x3 board there are exactly 8 ways to do it — 3 rows, 3 columns and 2 diagonals — and this game checks all 8 after every single move, then highlights the line that won. Taking the centre square first is the strongest opening, which is why the computer grabs it on Medium when nothing more urgent is available.
Yes — this opponent is beatable on purpose. Easy plays a uniformly random open cell, and Medium only looks one move ahead: it takes an immediate win, otherwise blocks your immediate win, otherwise takes the centre. Because it never searches deeper, it walks straight into a classic fork (take two opposite corners and you create two winning threats at once, and it can only block one).
It is free with no account, no download and no in-game purchase. The entire game is a client-side React component — the board, the win check and the computer's moves all run on your own device, and no move data leaves your browser.
Yes. Choose "Two players" under Round settings and take turns on one screen. X always moves first, the header shows whose turn it is, and every filled cell is disabled so you cannot overwrite a mark by mistake. In "Vs computer" mode you are X and the computer plays O, replying after a 420 ms pause.
Scores are kept while the tab stays open, not permanently. The X wins, O wins, draws and round counters live in React state — nothing is written to local storage or a server — so a page reload sets them all back to zero. Restart Game clears the board and advances the round while keeping the tally; Reset Score wipes the tally and returns to round 1.
Because 3x3 tic-tac-toe is a solved game: with both sides playing correctly, neither can force a win, so the result is a draw. This game reports that as "Round ended in a draw" the moment all nine cells are filled and none of the 8 winning lines match. Wins happen when someone misses a block or fails to spot a fork.
Yes. Each of the nine squares is a real HTML button, so Tab moves between them and Enter or Space places your mark. Every cell carries a spoken label such as "Cell 5, empty" or "Cell 5, Player X", the mode toggles report their pressed state, and cells are disabled once filled or once the round is over.