Big Pig: Sample #1237
In this example, the human uses r
and h
instead of roll
and hold
. The human gets 108 points all in one turn. The computer tries to come back but is a Big Pig, so the human wins 108-0.
$ python3 pig.py * BIG PIG * Welcome to Big Pig, the dice rolling game where players try to be the first get 100 points! Players (you and the computer) will take turns rolling two dice as many times as they want, adding all roll results to a running total. Players lose their gained score for the turn if they roll a 1. -------------------------------------------------- Player has 0 and computer has 0 What do you want to do: [r]oll or [h]old? r human rolled [2, 4], current round score: 6 What do you want to do: [r]oll or [h]old? r human rolled [3, 2], current round score: 11 What do you want to do: [r]oll or [h]old? r human rolled [2, 3], current round score: 16 What do you want to do: [r]oll or [h]old? r human rolled [5, 5], current round score: 36 What do you want to do: [r]oll or [h]old? r human rolled [3, 6], current round score: 45 What do you want to do: [r]oll or [h]old? r human rolled [4, 4], current round score: 61 What do you want to do: [r]oll or [h]old? r human rolled [2, 5], current round score: 68 What do you want to do: [r]oll or [h]old? r human rolled [2, 6], current round score: 76 What do you want to do: [r]oll or [h]old? r human rolled [5, 5], current round score: 96 What do you want to do: [r]oll or [h]old? r human rolled [3, 3], current round score: 108 What do you want to do: [r]oll or [h]old? h -------------------------------------------------- Player has 108 and computer has 0 computer rolled [3, 3], current round score: 12 computer rolled [2, 4], current round score: 18 computer rolled [4, 4], current round score: 34 computer rolled [2, 5], current round score: 41 computer rolled [1, 6], current round score: 0 Big pig! Human wins [108, 0]!