{"id":81,"date":"2021-03-19T22:52:10","date_gmt":"2021-03-19T22:52:10","guid":{"rendered":"https:\/\/eric.tedjamulia.com\/blog\/rebecca-tic-tac-toe\/"},"modified":"2026-10-29T05:11:03","modified_gmt":"2026-10-29T05:11:03","slug":"rebecca-tic-tac-toe","status":"publish","type":"post","link":"https:\/\/eric.tedjamulia.com\/blog\/rebecca-tic-tac-toe\/","title":{"rendered":"Tic-tac-toe with Rebecca"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I have been teaching Rebecca some programming with a game she already knows: tic-tac-toe. We built this one together in App Lab. Knowing the rules is the easy part. Getting the computer to follow all of them gives us something fun to figure out together.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wanted to practice keeping track of whose turn it is, checking whether a square is empty, and deciding when the game is over. We wrote out the winning rows, columns, and diagonals, then checked for a tie. A click is easy. Remembering what all the previous clicks mean is where it gets interesting.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"450\" src=\"https:\/\/eric.tedjamulia.com\/blog\/wp-content\/uploads\/2021\/03\/rebecca-tic-tac-toe-screenshot.png\" alt=\"Rebecca&#039;s tic-tac-toe board with a game in progress.\" class=\"wp-image-94\" srcset=\"https:\/\/eric.tedjamulia.com\/blog\/wp-content\/uploads\/2021\/03\/rebecca-tic-tac-toe-screenshot.png 320w, https:\/\/eric.tedjamulia.com\/blog\/wp-content\/uploads\/2021\/03\/rebecca-tic-tac-toe-screenshot-213x300.png 213w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/studio.code.org\/projects\/applab\/xsRPLbXPLylCgt-InVx8jVYw6jJW2xZOUyrdnNqgGYs\">Try Rebeccca&#x27;s Tic-Tac-Toe on Code.org.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been teaching Rebecca some programming with a game she already knows: tic-tac-toe. We built this one together in App Lab. Knowing the rules is the easy part. Getting the computer to follow all of them gives us something fun to figure out together. I wanted to practice keeping track of whose turn it [&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-81","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\/81","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=81"}],"version-history":[{"count":1,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":95,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions\/95"}],"wp:attachment":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}