Game of Pig
In the Game of Pig, two opposing players attempt win by being the player with the most total points after at least one player exceeds 100 total points.
At the beginning of the game, both players have 0 total points. In each round, player 1 takes a turn, and player 2 takes a turn. The game ends if at the end of a round, at least one of the players has 100 or more points. The winner is the player with the most total points.
The player begins a turn with 0 turn points. The player rolls a six sided die. If the die roll produces a 1, then the player’s turn pointsare removed, and their turn is over. If any other number is rolled (2-6), the roll is added to the player’s turn points. The player now chooses whether to quit the turn, or continue the turn. If the player quits the turn, their turn points are added to their total points. If the player continues, then the player rolls the die again, and follows the above outline based on the value rolled.
In this assignment, you will create a computer program that will allow two users to play the Game of Pig against each other.
Click here for more details of this assignment
Your comment will be posted after it is approved.
Leave a Reply.
This course is a full year. Students will be studying the basics of computer programming. The programming tool we will use is the popular and powerful language called Python (Python.org). Students will be exploring the fundamental logical concepts of programming that apply to any programming language.