Create a range of scoring combinations

Assignment Help C/C++ Programming
Reference no: EM132310779

Assignment Task: Farkle (a dice game) Game Overview:

In this assignment, you are to write dice game, where you roll six dice to create a range of scoring combinations. The first player to reach or exceed the target score is declared the winner! Any number of players may play, however, for the basic assignment you only need to implement one.

Basic Game Play:

In this program, you will control a set of six dice. On your turn, you must make as many scoring combinations (as outlined below) as you wish to score points towards the winning target score. The basic game play is as follows:
• One player is randomly chosen to go first. Players take turns in clockwise order. The game is played in rounds in which each player has a turn to roll the dice and score points.
• On your turn:
• Roll all six dice and set aside at least one die of a scoring value, (as shown below):

Dice

Points

Dice

Points

1's

100 each

3x3's

300

5's

50 each

3x4's

400

3x1's

1000

3x5's

500

3x2's

200

3x6's

600

 

Combinations only count when made in a single throw.
• You may now decide whether to score your points and end your turn or you can re-roll the remaining dice.
If you choose to roll again, you can keep rolling the dice, until you choose to stop or you roll no scoring values. Rolling no scoring values is called a FARKLE.
If you roll a FARKLE, you score NO POINTS for this round and your turn ends. Pass the dice to the next player.
If you set aside all 6 dice, you may re-roll all 6 dice and continue adding to your score, following all the rules above.
• The first player to score 5,000 or more points wins the game.
There are many variations to this basic game, some of which you will be able to implement as part of the extra functionality for your assignment.

A Typical Player Turn:
During a player's turn, the logic is as follows:
1) First, the player must roll all 6 dice to produce 6 random numbers from 1-6.

2) Next, they set aside at least one die that scores points (a single 1 or 5, or 3-of-a-kind). The points for which are stored in a running total for the player's turn. These dice cannot be rolled again, until after all 6 dice are set aside (see Step 4).

3) The player is presented with 2 options - roll the dice or score their points.
If they choose to score, the running total is added to their player score and their turn ends.
If they roll again, only those dice not set aside are rolled. Steps 2 and 3 may be repeated as often as the player wishes, until they use all 6 dice (Step 4) or roll a Farkle (Step 5).

4) If the player sets aside all 6 dice, they start again with all 6 dice and continue scoring as before this is called a Bonus Roll. Steps 2 and 3 may be repeated as often as the player wishes.

5) A Farkle is a roll with no scoring values - the player cannot take a single 1 or 5, or 3-of-a-kind. When this happens, the player ends their turn immediately and does not score the points rolled during that turn. Their saved score is not changed.
Here is an example roll for a player's turn:
• On their first roll, the player rolls a 1, 2, 3, 3, 5, 5.
• They can score 100 points for the 1, or 100 points for both 5s, or 50 points for 1 of the 5s, or 200 points for the 1 and both 5s.
• They choose to set aside just the 1 for 100 points and roll the 5 remaining dice again.
• This time they roll a 2, 3, 6, 6, 6. They decide to take the 600 points for the 3-of-a-kind in 6s.
• Their running total is now 700 points. This is a good score so they opt to save their points and end their turn.

Extra Functionality

The marking criteria indicates that you should make some individual additions to this in order to achieve the final 20% of the mark.
Following is a list of additional features you can include, with the maximum number of marks [x] you can earn for each one. You may implement one or more features from the list, but you will only be able to score a maximum of 20% of the marks.
• Include multiple human players making the game playable by 1 to 4 people. At the beginning of the game the player order must be randomised. Each player must track their own score and display their name and game score when required.
• If a player rolls three Farkles in a row (on three consecutive turns) they lose 1000 points from their saved score. Once they lose the points the counter for Farkles is reset to zero.
• Allow the players to choose the target score and the minimum points required to roll before saving points. Targets = 5,000 points, 10,000 points or 15,000 points. Minimum roll required = 350 points, 500 points, 750 points or 1000 points.
• Display the dice using ASCII art, showing the faces as pips not as numbers.

• When the first player reaches or exceeds the target score, all other players (in a multi-player game) have one final turn to try and beat that score. In this case, the player at the end of the round with the highest score wins.
• The basic game includes the minimal scoring options to make the game playable. However, you can include three or more of the following scoring combinations to make the game more interesting.

Dice

Points

Dice

Points

3 pairs

1000

straight*

1500

2x3-of-a-kind

2000

4-of-a-kind

2x points

5-of-a-kind

3x points

6-of-a-kind

instant win

• Allow the game to be played with computer players. The computer player should be able to make reasonably intelligent decisions for choosing scoring combinations and when to save their points. This AI can be a set of rules that the computer player checks before making a roll or when to save their score. [10]

• Implement a more sophisticated AI for the computer players. You may create different player types, each with their own strategies for playing, such as an easy player, a cautious player, an aggressive player, etc. The human player should be able to select the level of difficulty and number of their opponents at the beginning of the game. [10]
You certainly do not have to implement all of the above to earn marks for extra functionality. Just remember the maximum marks you can earn are given in the brackets [x]. It is up to you!

Program Design Diagram*
In this final assignment you are able to design your program in any way you like. You must provide a diagram with annotation that shows the classes you have in your program and how they interact. It should contain any relevant notes that describe the classes.
These diagrams should include appropriate UML diagrams as covered during class, including the basic class diagram notation for public, private and protected data and functions.

Program Reflection*
You must provide a 300-word written reflection of your object-oriented design and how well you believe it was to implement. You should cover the following areas:
• Discuss why you designed it the way you did.
• Discuss how well you were able to code it, highlighting any issues you found once you tried to implement your design.
• If you were to do this project again, discuss how you might change your design to make your solution easier to implement, more efficient, or better for code reuse.

Suggested Development Process
Below is a suggested process you might use to develop your assignment piece by piece so that it is not too overwhelming. Feel free to follow this if you think it will help (or not!).

1) Design the program on paper.
• Decide what classes you think you need and how they will relate to each other.
• Write down your thoughts on why you think this is the best design.
• You need to do this for the assignment anyway!
• Remember how you can use inheritance and pointers.

2) Write a simple class that you need and test it!

3) Write another simple class that you need and test it!

4) Do these two classes interact? If so, see if you can get basic interaction happening!
• Hint: I imagine some objects are going to battle...

5) Repeat the process for each additional class or function
• Either add to existing classes or write new ones if you need to.
• Remember, just focus on the small specific task!

Attachment:- Fundamentals of C++.rar

Verified Expert

The assignment is based on doing object oriented programming using c++. The object of the program is to implement the game of farkle, which is the dice rolling game. Each player is to roll six dice to create a series of scoring combinations. There is score rolling 1s,5s and pair of 2s,3s,4s,5s&6s. The player can not score if the farkle situation occurs, which is the condition if the player takes single 1 or 5 or 3 numbers of one kind. The player who first reaches the target score wins the game.

Reference no: EM132310779

Questions Cloud

What nominal rate per 6-months : What nominal rate per 6-months is equivalent to an effective rate of 13% per year, compounded continuously?
How much will kingston technologies have to pay : How much will Kingston Technologies have to pay each year in 10 equal payments, starting 2 years from now, to repay a $800,000 loan.
How different are the conclusions from this fourth prior : How different are the conclusions from this fourth prior distribution to those obtained under each of the previous three prior distributions?
How to define business cycle in statistic analysis : 1. How to define business cycle in statistic analysis, does it suggest cyclical? what kind of cyclical can be suggested as business cycle
Create a range of scoring combinations : FIT1048 - Fundamentals of C++ - Monash University - write dice game, where you roll six dice to create a range of scoring combinations
Presentation on Ethical Issues Caused by Social Networks : Presentation on Ethical Issues Caused by Social Networks on Delayed Childhood Vaccination and Policies in the United States with Reference Slide
Write a report summary on the topic-5g standards : Write a report summary on the topic-5G standards and critical review in the report. The report should be in IEEE format.
Writing a important suggestions from the plan you select : Search the Internet for IT governance planning. Select a specific governance plan that exists at a company or a plan framework from an organization. Write a.
Identify the surprising concepts that learned about religion : Explain what religion is, and give your opinion as to whether religion is different from spirituality. Identify three surprising concepts that you learned.

Reviews

len2310779

5/23/2019 3:40:43 AM

4. Reflection [10] Discussion of motivations for the program design [3] Discussion of how well the design was to implement [3] Discussion of what they would do differently if they were to start it again [4] 5. Extra Functionality [20] ? The player can select from 1-4 human players for the game [3] ? Three Farkles in a row loses the player -1000 points from saved score [3] ? Player sets the target and minimum score required to roll before saving points [4] ? Display the dice using ASCII art [4] ? Allow other players one final turn when the target score is reached or exceeded [5] ? Include three or more additional scoring combinations [5] ? Allow the game to be played with computer players [10] ? Implement a more sophisticated AI for the computer players [10]

len2310779

5/23/2019 3:40:35 AM

3. Quality of Solution and Code [25] Has a well-designed OO program been implemented? [5] ¦ Contains classes appropriate to the assignment brief [3] ¦ Program structures support and OO design [2] Individual Class Design [5] ¦ Each class has an appropriate header file [2] ¦ Contains only aspects that relate to the class (has no data members or member functions that are not directly related to the class) [3] Does the program perform the functionality in an efficient and extensible manner? [10] ¦ Appropriate use of pointers in the program [5] ¦ Appropriate use of functions and function calls [2] ¦ Appropriate use of good programming practices and techniques [2] ¦ Extraneous and redundant code removed [1] Has the Programming Style Guide been followed appropriately? [5] ¦ Appropriate commenting and code documentation [3] ¦ Correct formatting of code within *.h and *.cpp files [2]

len2310779

5/23/2019 3:40:28 AM

Does the program compile and run? Yes or No ? A non-compiling program will receive an automatic 50 marks penalty. 1. Class Design [10] Class Diagrams [3] ¦ Correct structure used (Name, Attributes, Behaviours) [1] ¦ Included the correct designations for public (+) and private (-) data [1] ¦ All variables and functions have meaningful names [1] Rationale for Class Design [7] ¦ Clear description of why the specific classes were chosen [3] ¦ Clear description of how these classes contribute to the overall OO design [4] 2. Functionality [35] Game set up: initialising the player, game variables and creating a collection of dice [4] Implementation of the basic game mechanics (roll and score) [4] Implementation of basic scoring combinations (as shown on table) [8] Implementation score tracking and updating as required [4] Appropriate screen display and uncluttered User Interface [5] Appropriate data validation to avoid program crashing [8] Appropriate end game conditions triggered [2]

len2310779

5/23/2019 3:40:10 AM

Submission guidelines This is an individual assignment, group work is not permitted Weighting: 25% of your final mark for the unit Late submission: ? By submitting a Special Consideration Form or visit this ? Or, without special consideration, you lose 5% of your mark per day that you submit late (including weekends). Submissions will not be accepted more than 5 days late. This means that if you got Y marks, only (0.95n)×Y will be counted where n is the number of days you submit late.

Write a Review

C/C++ Programming Questions & Answers

  Define the variables in an application

Discuss the cause of the inaccuracy in the original code and the approach used to fix this problem.

  Write a c program that will calculate the gross pay of a

write a c program that will calculate the gross pay of a set of employees.for each employee the program should prompt

  Write a gui program in graphics class to draw a smiley face

Write a GUI program that uses the methods in the Graphics class to draw a smiley face when the window is activated, and a frowny face when the window.

  Assignment on simple contact manager

Create a program that simulates a simple contact manager application given the following requirements:

  Calculates the equivalent total number of seconds

The program should declare 4 variables, hours, minutes, seconds, and totalSeconds, all of type int. You may declare at most 1 additional variable for temporary usage. No other variable are allowed.

  The two major modifications are the instruction of pointers

the two major modifications are the instruction of pointers and the calculation of mortgage interest rates.requirements

  Guessing game

In C++ develop a "guessing game" where the computer and the user alternatively guess the value of a randomly selected secret number between 1 and 99 (or any other maximum value). Initially, the computer selects the random number, and the user make..

  Write a for loop that adds the integers

Assume the int variables i , lo , hi , and result have been declared and that lo and hi have been initialized. Write a for loop that adds the integers between lo and hi (inclusive), and stores the result in result .

  A run is a sequence of adjacent repeated val

A   run   is   a   sequence   of   adjacent   repeated   values.   Using   an   array,   write   a   program   that   generates   a   sequence   of

  What must mr harrish do to avoid delay

If the property tax is not paid on time, the Municipal Corporation levies a late fee of R0. 2000. What must Mr. Harrish do to avoid delay in the payment

  Write a c program to construct a pyramid of numbers

Write a C program to construct a pyramid of numbers

  Contrast symmetric and asymmetric cryptography

"Cryptography is ‘generally' considered to be the broadest security technique available." Explain what this statement means with respect to the principles of information security.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd