Overview
For this project you will implement code for a game named clear
cell game. The game's goal is to maximize the number of cleared
cells in a colored board. Users will be able to click on a board cell and
cells surrounding the selected cell will be cleared if they have the same
color as the selected cell. Once a row of cells is cleared the row will be
removed (collapsed). The game will also keep track of the player's score:
The player gets one point for each cell that is cleared.
We will provide the graphical user interface (GUI) and you need to develop
the code that implements the rules of the game. A video illustrating the
collapse game can be found at: Game Video
Objectives
This project will allow you practice two-dimensional arrays, abstract
classes, and test development.
Grading
- (48%) Public Tests
- (42%) Release Tests
- (10%) Style
Code Distribution
The project's code distribution is available by checking out the project
named 132Fall2016Project3. The code distribution provides you with the following:
- gui package → Represents the graphical user
interface for the game. Executing the main method of this class will
allow you to play the game.
- model package → Includes the classes you need to
implement.
- tests package → Includes the public test
model.
- Text files → Represent the expected output for
public tests.
Specifications
You are expected to implement methods for the GameModel and
ClearCellGameModel class. The other classes have been provided and you should
not modify them. You should familiarize yourself with the BoardCell class
(gui package).The javadoc describing what you must implement can be found at:
Project Javadoc
No secret tests are associated with this project.
Requirements
- You may not use recursion during the implementation of the expected
methods. If you don't know what recursion is don't worry about it (it is
something we will cover later in the semester).
- Clearing one cell represents one point
- You may not use ArrayList or any other Java Collection class for this project
- When the ClearCellGameModel needs to generate a random row, it must
use the random number generator that was passed to its constructor.
- You may not add any classes but feel free to add any instance variables
and private methods you understand are necessary.
- Submit Often → This will keep versions of your
project in the submit server that are easy to retrieve (you can also get
previous versions from your CVS repository). If your computer crashes or
you experience any other problem you will have a permanent backup in the
submit server.
- IMPORTANT → If you have a problem with your code
and need assistance during office hours, you need to have a student
test(s) that illustrates the problem you are experiencing.
Suggestions on How To Start the Project
- Study the public tests before starting implementing your project.
- Notice that you can implement this project without using the GUI at
all.