Question: Objective: In this lab, you will design a dice - based game called 1 9 . The object of the game is to score exactly
Objective: In this lab, you will design a dicebased game called The object of the game is to score exactly points in as few rolls of a simulated die as possible. After each roll, the player can choose to add the current die value to his or her score or not, unless the die value is six, in which case it is automatically added to the player's score. If the player's score exceeds or the total turn count reaches the player loses. If the player's score is equal to the player wins.
Preparation Prelab
Draw a preliminary state diagram for the game as either a Moore or Mealy finite state machine.
Determine the components gates etc. you will use for the turn counter, die counter, and score circuits, and list them out.
Description
To start the game, the player resets the system using the reset input. The score will be set to zero the readytoroll LED will be on and the win, lose and loseturns LEDs will be off. The player then rolls the die by asserting the roll signal. The die counter operates with a clock frequency of MHz so that the player cannot control the outcome. When roll is deasserted, the roll ends. The signal turncount is then incremented by one to indicate that the player has taken a roll. If the turn counter reaches the loseturns LED is lit and remains on until the system is reset.
The dierolling circuit must operate only once and only at the proper time. For example, a player cannot roll again after a roll until either the accept or reject button is toggled, or unless a six is rolled. Also, the player cannot roll the die after the game has ended.
If the player rolls a six, it is automatically added to his or her score. Otherwise, the player can toggle the accept switch to add the die value to his or her score or the player can toggle the reject switch to leave the score unchanged. After each roll, the score will be greater than, less than or equal to If the score is equal to the player wins the win LED is turned on and remains on until the system is reset. If the score is greater than the player loses the lose LED is turned on and remains on until the system is reset.
If the score is less than and the turn count is less than the player will roll again. After each roll, the player toggles either the accept switch or the reject switch unless a six is rolled before the die can be rolled again. Create me a Next Sat Table and expressions for Mealy Machine
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
