Write a program that allows a single player to play

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

Game Specification:

Write a program that allows a single Player (the user) to play a simple four dice game of chance against "The Odds".

There is a single player, with four six sided die.

The sides of each die are labeled with the numbers from 1 to 6, we will call this the value of the die.

A game is made up of rounds, a single round is played as such:

The player rolls their four dice - you may use randi()

The dice are displayed, in some reasonable format.

The user is given the option to re-roll (up to two of their dice) and specify exactly which die they wish to re-roll.

The dice are displayed, in some reasonable format.

A determination is made as to whether or not the player won the round, this determination is made via the following rules:

A Quad is when all the dice have the same number on their top faces. If the player has any Quad then they receive 108 "win"s

A Triple is when exactly three of the dice have the same number on their top faces. If the player has any Triple then they receive 6 "win"s

A Two-Pair is when exactly two dice have the number n1 on their top faces, exactly two dice have the number n2 on their top faces, and n1 is not equal to n2. If the player has any Two-Pair then they receive 4 "win"s

A Junker is then anything that is not listed above. If the player has any Junker then they they receive 1 "lose"

The result of the round (with respect to the Player) is reported.

The player is asked if they wish to play another round.

Once the player indicates that they do not wish to play another round: Before exiting, the program displays a short report stating how many rounds were played, of those - how many were won and how many were lost.

Outline:

Create a MATLAB Script .m file

Write the necessary MATLAB commands to meet the game specification given above

Make sure to test your "program" when it is done

You really need to run your program a number of time to do this thoroughly

Reference no: EM132083329

Questions Cloud

Describe network technology in some detail : Networks, such as wireless WAN and LAN, are essential to mobile and pervasive computing because they provide access to information from practically anywhere.
Determining the resulting frequency data : A sample of 90 people is obtained, and each individual is asked to indicate his/her favorite brand. The resulting frequency data are as follows:
Journalize the transactions : On January 1, 2014, Oswalt Company had Accounts Receivable of $54,200, Journalize the transactions
Why is an understanding of risk and risk management : Why is an understanding of risk and risk management so important to an effective and successful information security program?
Write a program that allows a single player to play : Write a program that allows a single Player (the user) to play a simple four dice game of chance against "The Odds".
Calculate operating income for the period : Selling, general, and administrative expenses were $165,000; net sales were $750,000; Calculate operating income for the period
Why should website operators that allow users to add content : Why should Website operators that allow users to add content, for example, forums or blogs, carefully and consistently patch and configure their systems?
Compute the contribution margin per unit : WaterSports USA sells three types of wake boards. Information relative to sales in units and dollars are given below.
Calculate gross profit and the gross profit ratio for year : Net sales for the year were $1,050,000 and cost of goods sold was $735,000, Calculate gross profit and the gross profit ratio for the year

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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