07-Assignment-1-Blocky - CS106B Winter 2010 Handout 07...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS106B Handout 07 Winter 2010 January 8 th , 2010 Assignment 1: Blocky! Your first assignment has you implement variation on a one-player game called Blocky. The rules are simple: click any single block and drag the mouse to outline a rectangle so that all four corners are the same color. Then release the mouse to clear the region, collecting all of the pellets residing inside. Once you've collected all of them, you'll advance to another level. The goal is the collect all of the pellets across all levels as efficiently as possible. Each level is more difficult than the preceding one, because either the board dimension or the number of possible colors increases. The game ends when you fail to complete a level, complete all twelve levels, or you decide you’ve had enough and quit the application. Due: Friday, January 15 th at 11:00 a.m. Our first assignment is as much about coding as it is getting used to a new language and a new development environment. Truth be told, the amount of code you need to write for this assignment is not that much. But you’re learning a new language and a new development environment, and that will likely be as difficult, if not more difficult, than the assignment would have been had it required Java instead of C++. (I’m not dismissing C++, mind you. Trust me—C++ will soon allow us to do things that aren’t nearly as easy to do in Java.)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 The Rules For the most part, the rules are easily intuited by just playing a few games. But here they are anyway. There are a total of twelve levels, and you advance to each level as you complete the one that precedes it. The game ends either when you fail to complete a level, or you advance through all twelve. The board dimension and color count vary with each level. The first board is 5 by 5, using just two colors, and the twelfth board is 20 by 20 and uses five colors. The starter code makes it clear what these numbers are for all of the levels in between. Just look at the definition of the kLevelDescriptions constant in the starter code and you’ll see. You’re given a limited number of selections for each level, and if you exhaust them without clearing the board, the game ends. The number of selections granted per level is always twice the board dimension. That means you get 10 moves to clear a 5 x 5
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

07-Assignment-1-Blocky - CS106B Winter 2010 Handout 07...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online