Game: Left Center Right
Players: 4
Game Rules:
Each player receives three tokens at the start of the game
Player 1 goes first, then each player takes a turn, going clockwise
How many dice are rolled depends on how many tokens you have:
If you have 3 or more tokens, all 3 dice are rolled.
If you have 2 tokens, 2 dice are rolled.
If you have 1 token, 1 die is rolled.
If you have no tokens, no dice are rolled.
After the dice are rolled:
For each 4, a token is passed to the person on the left.
For each 5, a token is passed to the center.
For each 6, a token is passed to the person on the right.
For 1, 2, 3 that is rolled, nothing happens.
If at any point only one player has tokens remaining, that player is the winner.
Reach Features:
Animations and sound for rolling dice.
Tokens moving to other players and to the center.
Different sound effects for when buttons are pressed and new screens are loaded in.
Sound and pop-up window when there’s a winner.
Background Music throughout the application and different music for different screens.
Displaying game rules.
Start button take users to player selection screen.
Edit fields in which players type in the name they want to go by. That name is associated with a player number.
Radio button groups and images allow players to select what avatar they want to represent them.
Play button takes users to the game play screen.
Roll button performs a dice roll. After each roll, the program will automatically assign the next roll in a clockwise direction around the game board.
Rules button opens up a separate window containing the rules. Closing this window returns the user back to the game play screen.
Exit button takes the user out of the application.
Table next to the game board displays the number of tokens each player has after every roll. Once only a single player possesses tokens and the rest have 0 tokens, the app moves to the winner screen.
Displaying name, avatar, number of tokens the winner has at the end of the game.
Rematch button takes users back to player selection screen.
Exit button closes the application.
Game Demonstration and Code Explanation
There are 2 other members in my group: Muahammad Hassaan Rehman and Sethu Thirumal.
For the core of the game, I was in charge of writing the code for the dice to randomly give numbers from 1 to 6 when the roll button is pushed. And, based on the dice rolled, the tokens of the players change according to the rules with the implementation of if-else function. With that, the table is updated by adding a new row with the new number of tokens for each player after each roll. I also implemented an if-else function to check for the winner every time the roll button is pushed. For the reach, I did the rolling animation for the dice and also designed the buttons and titles for each screen.
My evaluation from my teammate, Hassaan:
Team member Anh was responsible for the important core features of creating a code to simulate a dice roll and update the table with the result of the dice roll. Anh also was responsible for a variety of reach features, such as creating more interesting designs for buttons and titles, as well as making the dice roll look more visually appealing. Team member Sethu and I agree that Anh more than exceeded expectations for her responsibilities and was a great groupmate.
The TA was really impressed with our game and we got 98/100 for this project.