Choose Pixel Pairs for asynchronous state
A mismatch remains visible for 800 milliseconds. During that time, the board must reject a third selection. Restart must cancel the pending delay so a callback from an old round cannot change the new board. This is a small, practical example of coordinating input with a timer.
Choose Three in a Row for turn logic
The tic-tac-toe board keeps nine cell values and a current player. Each valid move is checked against eight winning combinations, followed by the draw check. There is no hidden board or matching timer. Two people play locally; the starter does not include an AI opponent or network service.
How to extend either board
For Pixel Pairs, replace the symbols while keeping exactly two copies of each. For Three in a Row, highlight a winning line or add a round score. Both projects benefit from testing keyboard focus after a board redraw. If you add a reset button, make its behavior consistent during an active turn as well as after a win.
What both downloads include
Each ZIP contains index.html, a README, and the MIT license. Both run without package dependencies and store no online player score. Read the license before redistributing the source.
Read the related collection or guide · All template comparisons