{"id":4378,"date":"2022-02-26T10:50:04","date_gmt":"2022-02-26T10:50:04","guid":{"rendered":"https:\/\/brightchamps.com\/blog\/?p=4378"},"modified":"2026-02-02T13:08:38","modified_gmt":"2026-02-02T13:08:38","slug":"tic-tac-toe-game-in-scratch","status":"publish","type":"post","link":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/","title":{"rendered":"Learn to make a Tic Tac Toe Game in Scratch"},"content":{"rendered":"<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/brightchamps.com\/blog\/\">Home<\/a><\/span> \u00bb <span><a href=\"https:\/\/brightchamps.com\/blog\/code-for-kids\/\">Code for Kids Corner<\/a><\/span> \u00bb <span class=\"breadcrumb_last\" aria-current=\"page\"><strong>Learn to make a Tic Tac Toe Game in Scratch<\/strong><\/span><\/span><\/div>\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/brightchamps.com\/blog\/guides\/scratch-programming\/\" target=\"_blank\" rel=\"noreferrer noopener\">Scratch<\/a> is a block-based programming language that is great for beginners to learn programming concepts. Tic Tac Toe is a simple and fun game that has been around for centuries. By combining the two, we can create an interactive game that is easy to learn and provides a great opportunity to practice programming skills.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, <a href=\"https:\/\/brightchamps.com\/blog\/scratch-coding-for-kids\/\">scratch coding for kids<\/a> offers an excellent and interactive method for introducing programming concepts to children, nurturing their creativity and problem-solving abilities through enjoyable projects and games.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog, we will guide you step by step through the process of creating your own Tic Tac Toe game using Scratch. We will cover the basics of Scratch programming, including how to create sprites, use blocks, and handle user input. By the end of this tutorial, you will have a fully functional Tic Tac Toe game that you can play and share with others.<\/p>\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n<p class=\"wp-block-paragraph\">So, whether you&#8217;re a beginner looking to learn programming or a seasoned programmer looking for a fun project to work on, this tutorial is for you. Let&#8217;s get started!<\/p>\n\n\n\n<div class=\"wp-block-yoast-seo-table-of-contents yoast-table-of-contents\"><h2>Table of contents<\/h2><ul><li><a href=\"#h-what-is-tic-tac-toe\" data-level=\"3\">What is Tic Tac Toe?<\/a><\/li><li><a href=\"#introduction-to-scratch\" data-level=\"3\">Introduction to Scratch<\/a><\/li><li><a href=\"#steps-to-create-a-tic-tac-toe-game-in-scratch\" data-level=\"2\">Steps to create a Tic Tac Toe Game in Scratch<\/a><ul><li><a href=\"#designing\" data-level=\"3\">Designing<\/a><\/li><li><a href=\"#coding\" data-level=\"3\">Coding<\/a><\/li><\/ul><\/li><li><a href=\"#h-conclusion\" data-level=\"2\">Conclusion<\/a><\/li><\/ul><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-is-tic-tac-toe\"><strong>What is Tic Tac Toe?<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In some countries, Tic Tac Toe is also known as noughts and crosses. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" fetchpriority=\"high\" decoding=\"async\" width=\"1000\" height=\"982\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-edited.jpeg\" alt=\"Tic Tac Toe Game\" class=\"wp-image-4390\" style=\"width:500px;height:491px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-edited.jpeg 1000w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-edited-980x962.jpeg 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-edited-480x471.jpeg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1000px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This board game is usually played by two people wherein a 3&#215;3 grid, one player must mark &#8220;X,&#8221; while the other must mark &#8220;O.&#8221; Players take turns marking &#8220;X&#8221; and &#8220;O.&#8221; &nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A player wins if they get three of their &#8220;X&#8221; or &#8220;O&#8221; in the same row, column, or diagonal. The game ends in a tie when the board is completely filled without any player winning.<\/p>\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"introduction-to-scratch\"><strong>Introduction to Scratch<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Scratch is a block-based <a href=\"https:\/\/brightchamps.com\/blog\/time-taken-to-learn-scratch-coding\/\">programming language<\/a> that allows children to create games and animations while learning to think creatively. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Scratch is simple to learn because the blocks or codes are divided into categories such as Motion, Looks, Sound, Events, Controls, Sensing, Operators, Variables, and My Blocks.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"693\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-1-1024x693.png\" alt=\"Tic Tac Toe Game in Scratch\" class=\"wp-image-4380\" style=\"width:768px;height:520px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-1-980x663.png 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-1-480x325.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Kids can easily debug their code in Scratch because the <a href=\"https:\/\/brightchamps.com\/blog\/organize-scratch-script\/\">Code Area<\/a>, where they place their codes, and the Stage, where the output is displayed, can both be seen at the same time.<\/p>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"steps-to-create-a-tic-tac-toe-game-in-scratch\">Steps to create a Tic Tac Toe Game in Scratch<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To create a game or an app, we must focus on three factors:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Designing<\/li>\n\n\n\n<li>Coding<\/li>\n\n\n\n<li>Debugging<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">So, now let us start with the design part.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"designing\"><strong>Designing<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In Scratch, we must first create a backdrop.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"669\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step2-1024x669.png\" alt=\"Tic Tac Toe Game in Scratch\" class=\"wp-image-4381\" style=\"width:768px;height:502px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step2-1024x669.png 1024w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step2-980x641.png 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step2-480x314.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After choosing the backdrop, create your Sprites. Click on Choose the sprite and add a button sprite.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-3-1024x588.png\" alt=\"Tic Tac Toe Game in Scratch\" class=\"wp-image-4382\" style=\"width:768px;height:441px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-3-1024x588.png 1024w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-3-980x563.png 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-3-480x276.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here we need 9 buttons to make a 3&#215;3 grid<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"772\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-4-1024x772.png\" alt=\"Tic Tac Toe Game in Scratch\" class=\"wp-image-4383\" style=\"width:768px;height:579px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-4-1024x772.png 1024w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-4-980x739.png 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-4-480x362.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Each button should have 2 costumes marked X and O<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the backdrop, we have to add 2 costumes one for Game over if X wins and another for Game over if O wins.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"614\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-5-1024x614.png\" alt=\"Tic Tac Toe Game in Scratch\" class=\"wp-image-4384\" style=\"width:768px;height:461px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-5-1024x614.png 1024w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-5-980x588.png 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-5-480x288.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"coding\"><strong>Coding<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The next part to make this game in scratch is Coding. Now I&#8217;ll go over the coding for the sprite Button1. The code for all nine buttons is the same. As a result, you can easily copy the codes and paste them into other buttons.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"code-for-buttons\"><strong>Code for Buttons<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, we have to create two variables named Button for storing the value \u201cx\u201d or \u201co\u201d and a global variable for taking turns by the players and initializing them to zero.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"604\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-6.png\" alt=\"Tic Tac Toe Game in Scratch\" class=\"wp-image-4385\" style=\"width:750px;height:453px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-6.png 1000w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-6-980x592.png 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-6-480x290.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1000px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When the first player clicks any button the costume will switch to the \u201cx\u201d button. Now store the value\u201dx\u201d in the variable button and change the global variable by 1.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The next turn goes to player 2. When Player2 clicks another button the costume will change to the \u201co\u201d button.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So here, we have to give the condition that if the global variable is 1, switch costume to the \u201co\u201d button and store the value \u201do\u201d in the variable button. We use the broadcast message at the end of the script to check who wins the game X or O.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"956\" height=\"922\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-7.png\" alt=\"Tic Tac Toe Game in Scratch\" class=\"wp-image-4386\" style=\"width:717px;height:692px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-7.png 956w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-7-480x463.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 956px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When the backdrop switches to either \u201cX Wins\u201d or \u201cO Wins&#8221;, the buttons should hide.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"648\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-8.png\" alt=\"Tic Tac Toe Game in Scratch\" class=\"wp-image-4387\" style=\"width:749px;height:486px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-8.png 998w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-8-980x636.png 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-8-480x312.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 998px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Code for Backdrop<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you click the green flag, the backdrop should change to the first backdrop. This happens only when the game concludes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"880\" height=\"462\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-9.png\" alt=\"Tic Tac Toe Game in Scratch\" class=\"wp-image-4388\" style=\"width:660px;height:347px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-9.png 880w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Tic-Tac-Toe-Game-in-Scratch-Step-9-480x252.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 880px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Following that, when we receive the broadcast message, we must examine all of the possibilities of &#8220;X&#8221; and &#8220;O&#8221; winning the game. If any of the following conditions persist then, &#8220;X&#8221; will win the game, and the Backdrop will change to &#8220;X Wins Game Over.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Repeat for \u201cO\u201d and consider all the possibilities of &#8220;O&#8221; winning the game; if &#8220;O&#8221; wins, change the backdrop to &#8220;O Wins Game Over.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"run-the-project\"><strong>Run the Project<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">View the entire coding and visualize the output by clicking on this <a href=\"https:\/\/scratch.mit.edu\/projects\/639076939\">link<\/a> for a better understanding.<\/p>\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Congratulations! You have now learned how to create a Tic Tac Toe game in Scratch. By following this tutorial, you have gained valuable experience in programming basics, including how to create sprites, use blocks, and handle user input.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember, a Scratch is a great tool for learning programming, and there are endless possibilities for creating fun and interactive projects. With your newfound knowledge, you can now experiment with creating new games, animations, and interactive stories.<\/p>\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n<p class=\"wp-block-paragraph\">We hope that you found this tutorial informative and enjoyable. The best way to become proficient in programming is through practice, so keep coding and creating! Don&#8217;t forget to share your projects with others and continue to learn from the Scratch community.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To get your hands on more educational and free resources on\u00a0<a href=\"\/\/brightchamps.com\/blog\/kids-coding-languages\/\" target=\"_blank\" rel=\"noreferrer noopener\">coding for kids<\/a>, financial education for kids, and\u00a0<a href=\"https:\/\/brightchamps.com\/blog\/ultimate-guide-to-robotics-for-kids\/\">robotics for kids<\/a>\u00a0do check out the\u00a0<a href=\"https:\/\/brightchamps.com\/\">BrightCHAMPS<\/a>\u00a0Page now!<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Learn Scratch at <a href=\"https:\/\/brightchamps.com\/\">BrightChamps<\/a> with its specially designed curriculum that makes learning programming easy for students in Grades 1-12. BrightChamps also teaches a variety of other programs that help kids build a foundation in computer programming through activities, assignments, and <a href=\"https:\/\/brightchamps.com\/blog\/\">other means.<\/a><\/p>\n<\/blockquote>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"faqs\"><strong>Frequently Asked Questions (FAQs)<\/strong><\/p>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1645870163429\"><strong class=\"schema-faq-question\"><strong>How to draw a different backdrop instead of choosing a backdrop available in Scratch?<\/strong><\/strong> <p class=\"schema-faq-answer\">You can choose the paint option in Backdrop and draw your backdrop.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1645870539304\"><strong class=\"schema-faq-question\"><strong>What is the use of the Variable Button in the Tic Tac Toe game in scratch?<\/strong><\/strong> <p class=\"schema-faq-answer\">The Variable \u201dbutton\u201d stores the values \u201cx\u201d and \u201co\u201d<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1645870574337\"><strong class=\"schema-faq-question\"><strong>What is the use of the Global Variable in this game?<\/strong><\/strong> <p class=\"schema-faq-answer\">The Variable named global variable is used so that the players can get turns. For example, if the first player marks &#8220;X,&#8221; the second player should mark &#8220;O,&#8221; not &#8220;X.&#8221; To accomplish this, I used a global variable whose value alternates between 0 and 1. If the global variable is 0, &#8220;X&#8221; is marked; if the global variable is 1, &#8220;O&#8221; is marked.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1645870638088\"><strong class=\"schema-faq-question\"><strong>Can we include scores for the two players?<\/strong><\/strong> <p class=\"schema-faq-answer\">Yes, you can add two variables \u2018Score for player1\u2019 and \u2018Score for player2\u2019, and add the block \u201cChange score by 1\u201d after \u201cX\u201d wins and \u201cO\u201d wins<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1645870689220\"><strong class=\"schema-faq-question\"><\/strong> <p class=\"schema-faq-answer\"><\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Scratch is a block-based programming language that is great for beginners to learn programming concepts. Tic Tac Toe is a simple and fun game that has been around for centuries. By combining the two, we can create an interactive game that is easy to learn and provides a great opportunity to practice programming skills. Also, [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":4379,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"1080","footnotes":""},"categories":[49],"tags":[68],"class_list":["post-4378","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-for-kids","tag-codechamps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn to make a Tic Tac Toe Game in Scratch - BrightChamps Blog<\/title>\n<meta name=\"description\" content=\"Create a fun Tic Tac Toe game in Scratch with these simple steps and share it with your friends and family\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn to make a Tic Tac Toe Game in Scratch - BrightChamps Blog\" \/>\n<meta property=\"og:description\" content=\"Create a fun Tic Tac Toe game in Scratch with these simple steps and share it with your friends and family\" \/>\n<meta property=\"og:url\" content=\"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/\" \/>\n<meta property=\"og:site_name\" content=\"BrightChamps Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BrightChamps-101266664954230\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-26T10:50:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-02T13:08:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Learn-to-make-a-Tic-Tac-Toe-Game-in-Scratch.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2100\" \/>\n\t<meta property=\"og:image:height\" content=\"1185\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Team BrightChamps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Team BrightChamps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/\"},\"author\":{\"name\":\"Team BrightChamps\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/person\\\/696f52bb580934e5022585ac161e5123\"},\"headline\":\"Learn to make a Tic Tac Toe Game in Scratch\",\"datePublished\":\"2022-02-26T10:50:04+00:00\",\"dateModified\":\"2026-02-02T13:08:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/\"},\"wordCount\":1138,\"publisher\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Learn-to-make-a-Tic-Tac-Toe-Game-in-Scratch.png\",\"keywords\":[\"CodeChamps\"],\"articleSection\":[\"Code for Kids Corner\"],\"inLanguage\":\"en-US\",\"accessibilityFeature\":[\"tableOfContents\"]},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/\",\"name\":\"Learn to make a Tic Tac Toe Game in Scratch - BrightChamps Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Learn-to-make-a-Tic-Tac-Toe-Game-in-Scratch.png\",\"datePublished\":\"2022-02-26T10:50:04+00:00\",\"dateModified\":\"2026-02-02T13:08:38+00:00\",\"description\":\"Create a fun Tic Tac Toe game in Scratch with these simple steps and share it with your friends and family\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870163429\"},{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870539304\"},{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870574337\"},{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870638088\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#primaryimage\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Learn-to-make-a-Tic-Tac-Toe-Game-in-Scratch.png\",\"contentUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Learn-to-make-a-Tic-Tac-Toe-Game-in-Scratch.png\",\"width\":2100,\"height\":1185,\"caption\":\"Learn to make a Tic Tac Toe Game in Scratch\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code for Kids Corner\",\"item\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/code-for-kids\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Learn to make a Tic Tac Toe Game in Scratch\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/\",\"name\":\"BrightChamps Blog\",\"description\":\"BrightChamps Blog, also known as BrightChamps Hub is a go-to resource hub for everything on Coding for kids\",\"publisher\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#organization\",\"name\":\"BrightChamps\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/BrightCHAMPS-logo-new-1.png\",\"contentUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/BrightCHAMPS-logo-new-1.png\",\"width\":417,\"height\":80,\"caption\":\"BrightChamps\"},\"image\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/BrightChamps-101266664954230\\\/\",\"https:\\\/\\\/www.instagram.com\\\/brightchamps\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/brightchamps\\\/mycompany\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UC_Afe_rMGoK5Bs4nSt8QIzQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/person\\\/696f52bb580934e5022585ac161e5123\",\"name\":\"Team BrightChamps\",\"description\":\"We are an army of educators and passionate learners from BrightChamps family, committed to providing free learning resources to kids, parents &amp; students. Learn from Us\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/author\\\/team\\\/\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870163429\",\"position\":1,\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870163429\",\"name\":\"How to draw a different backdrop instead of choosing a backdrop available in Scratch?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"You can choose the paint option in Backdrop and draw your backdrop.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870539304\",\"position\":2,\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870539304\",\"name\":\"What is the use of the Variable Button in the Tic Tac Toe game in scratch?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The Variable \u201dbutton\u201d stores the values \u201cx\u201d and \u201co\u201d\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870574337\",\"position\":3,\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870574337\",\"name\":\"What is the use of the Global Variable in this game?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The Variable named global variable is used so that the players can get turns. For example, if the first player marks \\\"X,\\\" the second player should mark \\\"O,\\\" not \\\"X.\\\" To accomplish this, I used a global variable whose value alternates between 0 and 1. If the global variable is 0, \\\"X\\\" is marked; if the global variable is 1, \\\"O\\\" is marked.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870638088\",\"position\":4,\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/tic-tac-toe-game-in-scratch\\\/#faq-question-1645870638088\",\"name\":\"Can we include scores for the two players?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Yes, you can add two variables \u2018Score for player1\u2019 and \u2018Score for player2\u2019, and add the block \u201cChange score by 1\u201d after \u201cX\u201d wins and \u201cO\u201d wins\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn to make a Tic Tac Toe Game in Scratch - BrightChamps Blog","description":"Create a fun Tic Tac Toe game in Scratch with these simple steps and share it with your friends and family","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/","og_locale":"en_US","og_type":"article","og_title":"Learn to make a Tic Tac Toe Game in Scratch - BrightChamps Blog","og_description":"Create a fun Tic Tac Toe game in Scratch with these simple steps and share it with your friends and family","og_url":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/","og_site_name":"BrightChamps Blog","article_publisher":"https:\/\/www.facebook.com\/BrightChamps-101266664954230\/","article_published_time":"2022-02-26T10:50:04+00:00","article_modified_time":"2026-02-02T13:08:38+00:00","og_image":[{"width":2100,"height":1185,"url":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Learn-to-make-a-Tic-Tac-Toe-Game-in-Scratch.png","type":"image\/png"}],"author":"Team BrightChamps","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Team BrightChamps","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#article","isPartOf":{"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/"},"author":{"name":"Team BrightChamps","@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/person\/696f52bb580934e5022585ac161e5123"},"headline":"Learn to make a Tic Tac Toe Game in Scratch","datePublished":"2022-02-26T10:50:04+00:00","dateModified":"2026-02-02T13:08:38+00:00","mainEntityOfPage":{"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/"},"wordCount":1138,"publisher":{"@id":"https:\/\/brightchamps.com\/blog\/#organization"},"image":{"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#primaryimage"},"thumbnailUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Learn-to-make-a-Tic-Tac-Toe-Game-in-Scratch.png","keywords":["CodeChamps"],"articleSection":["Code for Kids Corner"],"inLanguage":"en-US","accessibilityFeature":["tableOfContents"]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/","url":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/","name":"Learn to make a Tic Tac Toe Game in Scratch - BrightChamps Blog","isPartOf":{"@id":"https:\/\/brightchamps.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#primaryimage"},"image":{"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#primaryimage"},"thumbnailUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Learn-to-make-a-Tic-Tac-Toe-Game-in-Scratch.png","datePublished":"2022-02-26T10:50:04+00:00","dateModified":"2026-02-02T13:08:38+00:00","description":"Create a fun Tic Tac Toe game in Scratch with these simple steps and share it with your friends and family","breadcrumb":{"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870163429"},{"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870539304"},{"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870574337"},{"@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870638088"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#primaryimage","url":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Learn-to-make-a-Tic-Tac-Toe-Game-in-Scratch.png","contentUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Learn-to-make-a-Tic-Tac-Toe-Game-in-Scratch.png","width":2100,"height":1185,"caption":"Learn to make a Tic Tac Toe Game in Scratch"},{"@type":"BreadcrumbList","@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/brightchamps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Code for Kids Corner","item":"https:\/\/brightchamps.com\/blog\/code-for-kids\/"},{"@type":"ListItem","position":3,"name":"Learn to make a Tic Tac Toe Game in Scratch"}]},{"@type":"WebSite","@id":"https:\/\/brightchamps.com\/blog\/#website","url":"https:\/\/brightchamps.com\/blog\/","name":"BrightChamps Blog","description":"BrightChamps Blog, also known as BrightChamps Hub is a go-to resource hub for everything on Coding for kids","publisher":{"@id":"https:\/\/brightchamps.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/brightchamps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/brightchamps.com\/blog\/#organization","name":"BrightChamps","url":"https:\/\/brightchamps.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2026\/03\/BrightCHAMPS-logo-new-1.png","contentUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2026\/03\/BrightCHAMPS-logo-new-1.png","width":417,"height":80,"caption":"BrightChamps"},"image":{"@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/BrightChamps-101266664954230\/","https:\/\/www.instagram.com\/brightchamps\/","https:\/\/www.linkedin.com\/company\/brightchamps\/mycompany\/","https:\/\/www.youtube.com\/channel\/UC_Afe_rMGoK5Bs4nSt8QIzQ"]},{"@type":"Person","@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/person\/696f52bb580934e5022585ac161e5123","name":"Team BrightChamps","description":"We are an army of educators and passionate learners from BrightChamps family, committed to providing free learning resources to kids, parents &amp; students. Learn from Us","url":"https:\/\/brightchamps.com\/blog\/author\/team\/"},{"@type":"Question","@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870163429","position":1,"url":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870163429","name":"How to draw a different backdrop instead of choosing a backdrop available in Scratch?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"You can choose the paint option in Backdrop and draw your backdrop.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870539304","position":2,"url":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870539304","name":"What is the use of the Variable Button in the Tic Tac Toe game in scratch?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"The Variable \u201dbutton\u201d stores the values \u201cx\u201d and \u201co\u201d","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870574337","position":3,"url":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870574337","name":"What is the use of the Global Variable in this game?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"The Variable named global variable is used so that the players can get turns. For example, if the first player marks \"X,\" the second player should mark \"O,\" not \"X.\" To accomplish this, I used a global variable whose value alternates between 0 and 1. If the global variable is 0, \"X\" is marked; if the global variable is 1, \"O\" is marked.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870638088","position":4,"url":"https:\/\/brightchamps.com\/blog\/tic-tac-toe-game-in-scratch\/#faq-question-1645870638088","name":"Can we include scores for the two players?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Yes, you can add two variables \u2018Score for player1\u2019 and \u2018Score for player2\u2019, and add the block \u201cChange score by 1\u201d after \u201cX\u201d wins and \u201cO\u201d wins","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts\/4378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/comments?post=4378"}],"version-history":[{"count":7,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts\/4378\/revisions"}],"predecessor-version":[{"id":32285,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts\/4378\/revisions\/32285"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/media\/4379"}],"wp:attachment":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/media?parent=4378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/categories?post=4378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/tags?post=4378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}