{"id":393,"date":"2019-06-10T19:00:00","date_gmt":"2019-06-11T02:00:00","guid":{"rendered":"http:\/\/mirahan.faculty.unlv.edu\/summercode\/?p=393"},"modified":"2023-06-13T07:13:35","modified_gmt":"2023-06-13T14:13:35","slug":"day-4-unit-3","status":"publish","type":"post","link":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/class\/day-4-unit-3\/","title":{"rendered":"Day 3 Unit 1"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Unit 1. <\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">Maze Game &#8211; continue<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We will continue with the Maze game!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Welcome back, we are continuing with the maze game. In the last unit, we made the sprites follow where your mouse pointer is going. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now we will enforce the rule that the sprite has to stay within certain colors in your backdrop, allowing them to only follow certain paths, like a maze!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To learn how to do that, let&#8217;s watch this video.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/maze-game\/stay-inside-the-lines.html\" target=\"_blank\">https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/maze-game\/stay-inside-the-lines.html<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Maze Game &#8211; If-then statements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that the rules of the game are built, we need to define the conditions to win. We will say that the user will win the game when the player sprite&nbsp;goes through the maze and catches the goal sprite&nbsp;without touching the boundaries.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The if, then statement you&#8217;ll create&nbsp;will read something like this:&nbsp;If touching the goal sprite, then say, &#8220;You win!&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s watch this video to learn how to code the winning condition.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/maze-game\/using-if-statements-to-win.html\" target=\"_blank\">https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/maze-game\/using-if-statements-to-win.html<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also add extra to your games.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/maze-game\/add-ons.html\" target=\"_blank\">https:\/\/csfirst.withgoogle.com\/c\/cs-first\/en\/game-design\/maze-game\/add-ons.html<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can create obstacles in your maze path, keep track of the time that users take to finish till the goal post, and redesign your maze. Have fun on your games at home.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Great work! Let&#8217;s share and show our work. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">add your project to our studios. <\/h2>\n\n\n\n<ol class=\"wp-block-list\" id=\"block-ca5d9fe1-e508-4c69-a218-22cfab89d1c9\">\n<li>Click&nbsp;<strong>Share<\/strong>&nbsp;button on the top of the page.<\/li>\n\n\n\n<li>Click on&nbsp;<strong>+add to studio&nbsp;<\/strong>button at the bottom of the page<\/li>\n\n\n\n<li>Choose\u00a0<strong>2023 summer code camp.<\/strong><\/li>\n\n\n\n<li>Click okay<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are super excited about game development, and want to do extra work at home, check out the race game in the optional work: <a href=\"https:\/\/mirahan.faculty.unlv.edu\/summercode\/class\/day-4-optional-race-game\/\">https:\/\/mirahan.faculty.unlv.edu\/summercode\/class\/day-4-optional-race-game\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unit 1. Maze Game &#8211; continue We will continue with the Maze game! Welcome back, we are continuing with the maze game. In the last unit, we made the sprites follow where your mouse pointer is going. Now we will enforce the rule that the sprite has to stay within certain colors in your backdrop, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-393","post","type-post","status-publish","format-standard","hentry","category-class"],"_links":{"self":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/wp-json\/wp\/v2\/posts\/393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/wp-json\/wp\/v2\/comments?post=393"}],"version-history":[{"count":51,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/wp-json\/wp\/v2\/posts\/393\/revisions"}],"predecessor-version":[{"id":1435,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/wp-json\/wp\/v2\/posts\/393\/revisions\/1435"}],"wp:attachment":[{"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/wp-json\/wp\/v2\/media?parent=393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/wp-json\/wp\/v2\/categories?post=393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mirahan.faculty.unlv.edu\/summercode\/wp-json\/wp\/v2\/tags?post=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}