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.
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. Keep
in mind that you can finish this project without ever playing the game through
the GUI. Also, keep in mind that you should not debug your code using the GUI
(student tests are preferable).
This project will allow you practice two-dimensional arrays, abstract
classes, and test development.
- (20%) Public Tests
- (30%) Release Tests
- (40%) Secret Tests
- (10%) Style
Any clarifications or corrections associated with this project will be
available at Project
The project's code distribution is available by checking out the project named ClearCellGame.
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
- tests package → Includes the public test
- Text files → Represent the expected output for
You are expected to implement methods for the Game and
ClearCellGame classes. The other classes have been provided and you should
not modify them. You should familiarize yourself with the BoardCell class.
The javadoc describing what you must implement can be found at
Notice you are not required to write student tests for credit, however,
if you need assistance during office hours you need to bring student tests
that illustrates the problem you are experiencing. Also, keep in mind the
percentage associated with secret tests is high, so you need to test your
- 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.
- Notice that when a cell is clicked, one or more rows might be cleared as a result.
Your program must collapsed all those rows.
- While checking the cells surrounding a particular one, do not use out of bounds
exceptions to implement the expected processing. You should verify whether a particular
cell access is legal or not before attempting such access.
Additional information about the game clearing rules can be
found at clearing rules. If you have any
doubts about the clearing rules, please see us during office hours
or in lecture.
- You may not use ArrayList for this project.
- You may not add any classes, but feel free to add any instance variables
and private methods you understand are necessary.
You will not be graded in terms of code coverage information provided by the
submit server, although having a high code coverage is highly recommended (and
- 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.
- See StudentTests.html
for information regarding the implementation of student tests for this
- See Style Guidelines for information
- We cannot provide any information regarding release nor secret tests.
Once your project has been graded, you can see a TA if you would
like to find out why you failed a release or secret test.
- The Random object parameter of the ClearCellGame constructor is a
reference you will store as an instance variable of the
ClearCellGame class. This object will be used while calling
the getNonEmptyRandomBoardCell method of the BoardCell class.
This is the only use you will have for this object (do not
use it for anything else).
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