CSc 305 Project 2

Collapse

Collapse is a puzzle game where the goal is to remove all the tiles from the playing area to reveal a picture underneath. In addition you may try to earn a high score by using as few turns as possible.

Display


Display as it appears during the game (without timer).

The game display has three parts. The playing area consists of a pattern of colored rectangular tiles. When the game starts the playing area is covered with 100 tiles in a 10 by 10 grid. Use the mouse (or other pointing device) to click on tiles in this area to cause them to disappear from the board. The button panel at the top has game control functions. The status panel just below the menu bar shows how many tiles remain on the board, how many moves completed, the current score, and the elapsed time in minutes and seconds.

Revealing the picture

Locate two or more tiles of the same color that are adjacent to each other horizontally or vertically (not diagonally) and click on one of them. All adjacent tiles will disappear from the board, and any tiles that are above them will slide down to fill in the vacant space. As you continue to remove tiles the picture underneath will be revealed from top to bottom. If you succeed in removing all the tiles, the background picture will change from a faded image to a bright image.  Notice that if an entire column is removed, the remaining columns are left-justified.

Scoring

Removing a larger number of tiles with a single move will earn more points as shown in the table below.

tiles
removed 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

points 2 3 5 6 7 9 11 12 14 16 19 21 24 27 31 35 40 46 50 53 55


Levels

There are five levels in the game. The first level (depicted above) contains a random pattern of tiles of 3 colors. Click the "Next Level" button to advance a level and add another color to the board. The last and most difficult level shows seven colors of tiles. At this level there are fewer tiles of each color so it is more difficult to find adjacent tiles that can be removed.  There's a 100 point bonus for each higher level; thus clearing level 2 earns 100 bonus points, clearing level 3 earns 200 bonus points, etc.

Clicking the "Restart" button will reset the board for the level you are currently playing.

Games

Collapse has 5000 different possible starting configurations. A random configuration is chosen when the game starts.  (For each starting configuration, there are five levels).

You may start the game over in a new configuration (at level 0) by clicking the "New Game" button.

Most players are content to play whatever random board the game generates. However, you may choose to start a new game with a specific board by clicking  "Select Game". A dialog box will allow you to enter an integer specifying which board you want to play.

Playing the game

Try to remove all the tiles on the first level (three colors). If you get stuck, click "Restart" to start over. When you are successful, take a moment to relax and enjoy the lovely picture you have revealed. (The background changes from faded to bright). When you are ready to resume, click "Next Level" to advance to level two which features four colors of tiles. 

When you clear a board, you may enter your name into the high scores list.  A dialog box will appear prompting you to enter your name.

The Scores button will display the list of high scores and times in descending order, ordered by level, then score and then time, as in this example:

5 Bill 1098 12:45
3 Sam 977 9:13 
3 Joe 968 9:47
2 Frank 431 8:15
2 Steve  431 8:20
2 Jack 429 8:01
1 Matt 399 5:29
1 Tim 387 5:13

Skins

A variety of different tile face and background picture combinations are available as "skins." When the game starts, a dialog appears with a list of available skins. Select the skin you desire and it will be used when the board is displayed.


Skins choices are stored in a file named "preferences.ini" that uses Windows ini file format. To read the preferences file:  [ini4j] - Java API for handling Windows ini file format

Help

There is a hidden "About" button (Alt-A) to display a message box showing the version number, the current skin being displayed, and the current game number.

A hidden "Cheat" button (Alt-C) clears the entire game board (but doesn't win the game).
Note these must be buttons. Do not use a keylistener. Use a button mnemonic.

Resources

CollapseSkins.zip

Grading

C - basic graphical game play. Restart and New Game buttons. No Levels.
B - Timer and Score display.  Win dialog for entering user name; save score, and time.
Scores button, ordered list display.
A - all features, including faded background becomes bright on board cleared, level advancing and save level on win, Skin choice.

Assignment Submission - Due Tues 1/26 11:59pm

  1. Make sure your source code compiles with no errors and passes CheckStyle. (You're allowed 5 violations per 1000 lines of code.)
  2. Use handin to submit your source code electronically (see below).
  3. For this project you do not need to print your source code.
  4. Create a "known issues" list: Indicate which feature set you implemented: A, B, or C. Then list any defects, unimplemented features, missing requirements, outstanding problems, or other issues that you are aware of in your submission.
  5. Submit your work to the table in front of the classroom at the next class meeting after the due date.

Handing in Your Source Code Electronically
       handin  graderjd  Project2  Collapse.zip
      

 



1/24/2010 Changed submission directions to submit a BlueJ project zip. Omitted source code printout and added known issues list.
1/16/2010 Removed JAR handin requirement. Added link to skins zip file.