Using the game Tetris, here is an example project proposal including the types of justifications we expect for each of the core concepts. core concepts used to create it. Note, this is one example of how you could break this game down and is not the only correct way to do so.
What game are you planning to implement? If it is a game of your own design, or not especially well-known, provide a 2-3 sentence description of the game.
We are going to implement Tetris.
What classes and interfaces do you plan to create? How will the different components of your game (the model, the GUI, etc.) interact?
We will create a Piece interface with concrete subclasses for each of the differen shapes (L, S, J, etc.). In addition, we will have a Board class that stores a 2-D array which represents the board. The board will also contain the pieces that are currently on the board, and be responsible for clearing them. There will be a function in Board which allows it to be drawn as a JComponent in the GUI.
What do you think will be the most challenging thing to implement?
I think Tetris piece rotations will probably be the most challenging, because they require a lot of checking to see whether a particular rotation is allowed given the location of the piece and the pieces around it.
What specific feature of your game will be implemented using this concept?
A 2D Array makes sense to represent the tetris board as a grid. It will allow search to be implemented easily because we can search for completed rows using the inner arrays and the outer array holds each of the rows.
Why does it make sense to implement this feature with this concept? Justify why this is a non-trivial application of the concept in question.
The 2-D array is an appropriate data structure because the board cannot be resized, and it is a regular grid with order and indices.
What specific feature of your game will be implemented using this concept?
We will use a search algorithm to check whether a row has been filled. We constantly have to check because pieces are always falling.
Why does it make sense to implement this feature with this concept? Justify why this is a non-trivial application of the concept in question.
We need to do a search of the current game state to determine whether a row should be cleared. This is non-trivial because it requires that a whole row, comprised of multiple pieces, be checked as opposed to a single square.
What specific feature of your game will be implemented using this concept?
We will use an inheritance hierarchy to model the different types of shapes in the tetris game.
Why does it make sense to implement this feature with this concept? Justify why this is a non-trivial application of the concept in question.
Since there are many types of Pieces that all fall and can rotate, it makes sense to have an interface of Piece. It doesn't make sense to have Piece as a class opposed to an interface because you would never instantiate a generic Piece. Additionally, it makes sense to have each type of Piece (L, J, S, etc.) as a different class because their implementations of fall and rotate will be different from each other.
What specific feature of your game will be implemented using this concept?
We chose to test the different implementations of rotate.
Why does it make sense to implement this feature with this concept? Justify why this is a non-trivial application of the concept in question.
This makes sense to test over any other component because this is the core of the game logic. If we don't have rotations correct, then checking that a row has been completed will not work. Additionally, displaying a falling and rotating piece will not work until rotations are implemented correctly. Some of the edge cases we have considered are rotating next to the wall and rotating next to a block of stationary pieces. Our test cases are not redundant because we are testing the rotate implementation for each Piece.