Multiplayer tic-tac-toe with Rebecca

For another programming project with Rebecca, I wanted to teach her how two computers could share a game. We came back to tic-tac-toe, but this time one player creates a game and gets a code that the other player can use to join. A fun new problem for a familiar game.

I wanted Rebecca to see that the board does not have to live on just one screen. App Lab's data tables hold the players, squares, and current turn, and each browser checks for updates. We reused one function for clicking any square instead of writing the same code nine times. Still an experiment, but a fun step beyond passing one computer back and forth.

Code.org's saved preview of the multiplayer tic-tac-toe lobby.

Try Multiplayer Tic Tac Toe on Code.org.