Project Plan
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Project Plan
Assignment 2 – PLANNING FARKLE
Project Overview and Description
The aim of this project is to create a game known as Farkle using programming language C++. In this project, we will be focusing on a single player computer-based variant of this dice game.
The gameplay of Farkle is as follows. The aim of the game is to score a target number of points to achieve victory. In this case it will be set to 5000 points. The player will first roll 6 dice then choose at least one die to set aside and record for points. The player can then either choose to record the points and end their turn or they proceed to roll the remaining die. However, if choosing to roll again and yielding no scoring value, you have rolled a FARKLE. Therefore, you score no points for this turn.
The point scoring system is as follows:
Scoring Guidline
Roll |
Point Value |
Rolling 5 |
50 points |
Rolling 1 |
100 points |
Rolling 1, 1, 1 |
300 points |
Rolling 2, 2, 2 |
200 points |
Rolling 3, 3, 3 |
300 points |
Rolling 4, 4, 4 |
400 points |
Rolling 5, 5, 5 |
500 points |
Rolling 6, 6, 6 |
600 points |
Four of a kind |
1000 points |
Five of a kind |
2000 points |
6 of a kind |
3000 points |
1-6 straight |
1500 points |
Three pairs |
1500 points |
Four of a kind and a pair |
1500 points |
Two triplets |
2500 points |
An example of a player’s turn:
1. Player rolls the 6 dice
2. They set aside at least one die that scores points (refer to scoring guideline above)
3. They play can now either roll the rest of the die or score their points
a. If they score their points, they add these points to their total score
b. If they choose to continue rolling the rest of the dice, they can proceed with step 2 and 3 as many times as they want until they use all die or roll a Farkle.
4. If the player sets aside all the six dice, they can roll all the 6 dice again.
5. If the player rolls the dice which yield no scoring value, this is a FARKLE, and they score no points for their entire turn.
Project Development Outline
The Game Setup
· The game will display the overview and description of the game
o The game description should be read from text file
· Main menu is displayed
o 5 options in main menu
§ Start Game
§ Game Description
§ Change difficulty
§ View scores
§ End Game
· Initialising the game elements
o Set and initialise all default variables
§ Variables: die, score, turns, rounds, victory
· Player chooses skill level (rookie, roller, high roller)
o Sets different target score according to skill level
o Sets minimum required points to score
The player’s turn
· Player rolls 6 die
o This will be using the die class (ie, class functions will be used)
· Player will be asked which die they will want to set aside
o Die value of the set aside die will then be displayed
o This will be added to the round score
· Player will be asked if they want to continue rolling
o If scoring points they added to the round score
o If rolling farkle all round score is overwritten to 0
Processing player input
· Player will choose option (1-5) in main menu
· Player will choose how many dice to set aside
· Player chooses if they will continue to roll
· Player can choose if they would like to play again
Providing feedback to the player (in response to the player’s interactions)
· Main menu will feedback the option that the playing chooses
· Die values will be displayed after every roll has occurred
· Score value of die will be displayed after rolls
· Even after setting aside die, if die is rerolled, value of set aside die will be displayed to remind player
· If farkle is rolled, it will display to player
· Amount of die rolled and amount of die set aside will be displayed after die rolled
· Total score will be displayed after each action
The end game conditions
· Different difficulties have different win conditions rookie, roller, high roller require 5000, 10000 and 20000 respectively to win
· If the player rolls 3 farkles they will lose 1000 points from their total score, after this occurs farkle counter returns to 0.
Functionality of game classes
PLAYER:
· displayPlayer(): this displays the player and their current information
· displayScore(): this displays the current score of the player
DIE:
· rollDie(): this rolls the die and returns random value of 1-6
· displayValue(): this displays the value of the die
UML Class diagrams
Player |
-name: string -type: -die: int -score: int -turns: int -rounds: int -victory: bool -skillLevel: string |
+player(Playername: string.) +*Player(); +displayPlayer(): string +displayScores(): void |
Die |
-value: int -diceNumber: int -dieStatus: string |
+rollDie(): void +displayValue(): void +setAside: void |
2021-12-27
Assignment 2 – PLANNING FARKLE