{"id":93,"date":"2010-08-24T18:09:35","date_gmt":"2010-08-25T01:09:35","guid":{"rendered":"http:\/\/blogs.unsw.edu.au\/comp1400\/?p=93"},"modified":"2010-08-24T20:22:53","modified_gmt":"2010-08-25T03:22:53","slug":"lab-6-breakout","status":"publish","type":"post","link":"https:\/\/blogs.unsw.edu.au\/comp1400\/blog\/2010\/08\/lab-6-breakout\/","title":{"rendered":"Lab 6 &#8211; Breakout"},"content":{"rendered":"<p>The task in this lab is to automatically generate different levels for the Breakout game written in the lecture. For each of the three layouts below, write a script which creates bricks in this arrangement.<\/p>\n<p>Use two for loops to create the bricks. The outer loop should count the layers. The inner loop should count the number of bricks in each layer. You can base your code on the <a href=\"http:\/\/www.cse.unsw.edu.au\/~cs1400\/lectures\/06\/CreateBricks.js\">script<\/a> I wrote in the lecture.<br \/>\n<!--more--><\/p>\n<p><a href=\"http:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-10.56.05-AM.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-10.56.05-AM.png\" alt=\"\" width=\"584\" height=\"371\" class=\"alignleft size-full wp-image-95\" srcset=\"https:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-10.56.05-AM.png 584w, https:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-10.56.05-AM-300x190.png 300w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-11.00.24-AM.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-11.00.24-AM.png\" alt=\"\" width=\"572\" height=\"420\" class=\"alignleft size-full wp-image-96\" srcset=\"https:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-11.00.24-AM.png 572w, https:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-11.00.24-AM-300x220.png 300w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-10.46.46-AM.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-10.46.46-AM.png\" alt=\"\" width=\"595\" height=\"443\" class=\"alignleft size-full wp-image-94\" srcset=\"https:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-10.46.46-AM.png 595w, https:\/\/blogs.unsw.edu.au\/comp1400\/files\/2010\/08\/Screen-shot-2010-08-25-at-10.46.46-AM-300x223.png 300w\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" \/><\/a><br \/>\n<strong>Hint for the circle<\/strong>: Don&#8217;t bother trying to calculate the X and Y-coordiantes for the bricks. Instead, just create bricks at the centre of the circle, rotate them and then translate them out to their ring.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The task in this lab is to automatically generate different levels for the Breakout game written in the lecture. For each of the three layouts below, write a script which creates bricks in this arrangement. Use two for loops to create the bricks. The outer loop should count the layers. The inner loop should count [&hellip;]<\/p>\n","protected":false},"author":80,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[630],"tags":[4592],"class_list":["post-93","post","type-post","status-publish","format-standard","hentry","category-lab","tag-breakout"],"_links":{"self":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/users\/80"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":6,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"predecessor-version":[{"id":102,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts\/93\/revisions\/102"}],"wp:attachment":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}