COMP1400 – Programming for Designers

Class announcements for Programming for Designers

COMP1400 – Programming for Designers random header image

Lab 6 – Breakout

Posted by on August 24th, 2010 · Lab

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 the number of bricks in each layer. You can base your code on the script I wrote in the lecture.


Hint for the circle: Don’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.

No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

You must log in to post a comment.