{"id":98,"date":"2026-01-09T15:07:55","date_gmt":"2026-01-09T15:07:55","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/d_harkless\/?p=98"},"modified":"2026-01-09T15:07:55","modified_gmt":"2026-01-09T15:07:55","slug":"free-friday-1-9-2026","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/d_harkless\/2026\/01\/09\/free-friday-1-9-2026\/","title":{"rendered":"Free Friday 1-9-2026"},"content":{"rendered":"\n<p>Today in class I made tic-tac-toe.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"160\" height=\"127\" src=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/01\/image.png\" alt=\"\" class=\"wp-image-99\"\/><\/figure>\n\n\n\n<p>This is the code for the board:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>board = &#91;\"-\", \"-\", \"-\",\n         \"-\", \"-\", \"-\",\n         \"-\", \"-\", \"-\"]<\/code><\/pre>\n\n\n\n<p>This is the code for printing the game board:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def printBoard(board):\n    print(board&#91;0] + \" | \" + board&#91;1] + \" | \" + board&#91;2])\n    print(\"----------\")\n    print(board&#91;3] + \" | \" + board&#91;4] + \" | \" + board&#91;5])\n    print(\"----------\")\n    print(board&#91;6] + \" | \" + board&#91;7] + \" | \" + board&#91;8])<\/code><\/pre>\n\n\n\n<p>This is the code for checking for wins:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"563\" height=\"857\" src=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/01\/image-1.png\" alt=\"\" class=\"wp-image-100\" srcset=\"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/01\/image-1.png 563w, https:\/\/theroyalscode.com\/students\/d_harkless\/wp-content\/uploads\/2026\/01\/image-1-197x300.png 197w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/figure>\n\n\n\n<p>This is the code for switching players:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def switchPlayer():\n    global currnetPlayer\n    if currnetPlayer == \"X\":\n        currnetPlayer = \"O\"\n    else:\n        currnetPlayer = \"X\"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Today in class I made tic-tac-toe. This is the code for the board: This is the code for printing the game board: This is the code for checking for wins: This is the code for switching players:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-98","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/98","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/comments?post=98"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/98\/revisions"}],"predecessor-version":[{"id":101,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/posts\/98\/revisions\/101"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/media?parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/categories?post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_harkless\/wp-json\/wp\/v2\/tags?post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}