3 # This file is part of NIT ( http://www.nitlanguage.org ).
4 # This program is public domain
6 # Task: Pig the dice game
7 # SEE: http://rosettacode.org/wiki/Pig_the_dice_game
14 if (score
[player
] + turnscore
) >= max_score
then
15 print
"Congratulation Player {player + 1}! You won with {score[player]} points! "
18 print
"Player {player +1}"
19 print
"Total score : {score[player]}"
20 print
"What do you want to do? (\"1\
" to roll, \"0\
" to hold)"
21 if stdin
.eof
then break
27 print
"You rolled 1! all points lost for this turn"
32 print
"rolled: {roll}"
33 print
"score this turn: {turnscore}"
36 else if input
== "0" then
37 score
[player
] += turnscore
38 print
"Scored: {turnscore}"
39 print
"New Score: {score[player]}"