You are on page 1of 2

Final Project – Three Card Monte

For the final project, I will be using four of the card icons from previous assignments to create an
android game application that allows the user to pick one of three cards on the screen. If the player
picks the Ace the player wins whereas the other two cards cause the player to lose.

For this application, we will be changing the colors of the interface and using the image buttons to
create the game.

Phase 1: Design the android application GUI

1. Create three image icons on the screen using the back card icon. Label each icon for use in the
program.
2. Create a title and instructions for the game to tell the player what is expected.
3. Create a reset button to reinitialize the game for the next turn.
4. Create a text box to the player if they have won or lost.
5. In the strings.xml add the winning and losing text that will be referred to in the code.
6. Change the background colors of the application and the buttons.

Phase 2: Build the code

1. Associate all application widgets with variables in the code


2. Create a random number generator to determine which slot the winning card will be in.
3. Create listeners for each of the image buttons and the reset button.
4. Display all the cards after each turn and tell the user whether they have won or lost.
5. Hide the reset button and the game results until the player has taken their turn.
6. Only allow the player to select one card then require a reset.

Testing Procedures:

Verify on launch that reset button and results text box is not visible on launch.

Go through each card slot multiple timers and verify that the winning and losing functions are correct.

Verify the result and the reset button is displayed after an image has been selected.

Verify each of the random numbers generated based on the pictures displayed.
UML Diagram

You might also like