{"id":87,"date":"2023-06-22T00:50:08","date_gmt":"2023-06-22T00:50:08","guid":{"rendered":"https:\/\/eric.tedjamulia.com\/blog\/rebecca-multiplayer-tic-tac-toe\/"},"modified":"2026-10-29T05:11:03","modified_gmt":"2026-10-29T05:11:03","slug":"rebecca-multiplayer-tic-tac-toe","status":"publish","type":"post","link":"https:\/\/eric.tedjamulia.com\/blog\/rebecca-multiplayer-tic-tac-toe\/","title":{"rendered":"Multiplayer tic-tac-toe with Rebecca"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wanted Rebecca to see that the board does not have to live on just one screen. App Lab&#x27;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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"220\" height=\"309\" src=\"https:\/\/eric.tedjamulia.com\/blog\/wp-content\/uploads\/2023\/06\/rebecca-multiplayer-screenshot.png\" alt=\"Code.org&#039;s saved preview of the multiplayer tic-tac-toe lobby.\" class=\"wp-image-104\" srcset=\"https:\/\/eric.tedjamulia.com\/blog\/wp-content\/uploads\/2023\/06\/rebecca-multiplayer-screenshot.png 220w, https:\/\/eric.tedjamulia.com\/blog\/wp-content\/uploads\/2023\/06\/rebecca-multiplayer-screenshot-214x300.png 214w\" sizes=\"auto, (max-width: 220px) 100vw, 220px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/studio.code.org\/projects\/applab\/beaafc92-ce86-407c-979c-81463f9f1c63\">Try Multiplayer Tic Tac Toe on Code.org.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72],"tags":[73,5,3,25],"class_list":["post-87","post","type-post","status-publish","format-standard","hentry","category-programming-with-kids","tag-code-org","tag-family","tag-javascript","tag-teaching"],"_links":{"self":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/87","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/comments?post=87"}],"version-history":[{"count":1,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/87\/revisions"}],"predecessor-version":[{"id":105,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/87\/revisions\/105"}],"wp:attachment":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/media?parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/categories?post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/tags?post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}