Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using c++ Assignment Specifications We are going to use the Monte Carlo Method to determine the probability of scoring outcomes of a single turn in
Using c++
Assignment Specifications We are going to use the Monte Carlo Method to determine the probability of scoring outcomes of a single turn in a game called Pig. Your Task For this assignment you will simulate a given number of hold-at-N turns of a game called Pig, and report the estimated probabilities of the possible scoring outcomes. You are NOT implementing the game of Pig, only a single turn of this game. The value of N will be acquired via user input, as will the number of repetitions. What is Pig? Pig is a folk dice game with simple rules: Two players race to reach 100 points.In each turn, a player repeatedly rolls a die until either the player holds and is credited with the sum of the rolls so far (i.e. the current turn score) or rolls a 1 (pig"), in which case the turn score is o. I So at every point during a turn, the player is faced with a choice between two moves: roll (again) a roll of the die occurs 2-6: the number is added to the current turn score; the turn continues 1: the player loses all points accumulated in the turn (i.e. scores a O); turn ends hold- The turn ends as the the hold option is invoked for one reason or another. You can play the game yourself a few times before you start to think about the assignment. It can be useful to visualize and understand how a turn works. Play the game here Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started