Write a matlab program that allows a single player

Assignment Help Computer Engineering
Reference no: EM132206077

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

1)There is a simple player, with FOUR six sided die.

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

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

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

B) The dice are displayed, in some reasonable format.

C)The user Is given the option to re-roll (up to two of their dice) and specify exactly with die they wish to re-roll

D)The dice are displayed, in some reasonable format.

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

i) 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

ii) 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

iii) 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 teo-pair then they receive 4 "win"s

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

4)The player is asked if they wish to play another round

5)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.

NOTES: you will need to use the

<var> = randi ([1,6],1);

To assign <var> a random die roll value

Reference no: EM132206077

Questions Cloud

Design parameters obtained by running the matlab program : For each type of antenna provide the Matlab program and the design parameters obtained by running the Matlab program.
A program that simulate the stuck in the mud game : The program should accurately play the number of rounds specified by the user. The player and the computer play in turns for each round.
Determine the minimum and maximum value of an array : Write a MATLAB program that will determine the minimum and maximum value of an array along with the index of the minimum and m aximum values.
Calculate the surface area and volume for cubes : Calculate the surface area and volume for cubes with side lengths of 1, 2, 3, 4, and 5 cm.
Write a matlab program that allows a single player : Write a MATLAB program that allows a single player (the user) to play a simple dice game of chance against "The Odds".
Write a matlab function which uses the gaussian elimination : Write a Matlab function "x = my_ GE(a, b)" which uses the Gaussian Elimination method described in decks to solve Ax = b.
Take a matrix as an input and returns a vector : Write a MATLAB function that takes a matrix as an input and returns a vector that contains the number of rows and columns in the matrix.
Implement the computer program : Create a computer program that allows a user to enter items that are able to be recycled into a machine. During the process the machine prompts the user
What would you to detect and remove the threat : Your system has been compromised. What would you to detect and remove the threat. This is a zero day attack, so there is no "commercial" solution.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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