Anonymous user
Pig the dice game/Player: Difference between revisions
→{{header|M2000 Interpreter}}
No edit summary |
|||
Line 2,008:
=={{header|M2000 Interpreter}}==
Strategy like ADA, look if get 8 or
<lang M2000 Interpreter>
Module GamePig {
Print "Game of Pig"
\\
▲ Score()
Player1sum+=Player1points
▲ PlayerTurn(&Player2points,&player2sum, player1sum)
PlayerTurn(&Player2points,&player2sum, player1sum, 12, 20)
Score()▼
if res$="Q" then exit
Player2sum+=Player2points
If HaveWin then {▼
Score()
If HaveWin then
If Player1Sum>Player2sum then {
Print "Player 1 Win"
win1++
} Else Print "Player 2 Win" : win2++
}
Print "Strategy 1 Win", win1;">";win2
} Else Print "Strategy 2 Win", win2;">";win1
Sub Rolling()
Line 2,063 ⟶ 2,071:
} Until Instr("RHQ", res$)>0
End Sub
Sub PlayerTurn(&playerpoints, &sum, othersum, Max_Points, Min_difference)
PlayOrQuit()
If res$="Q" then Exit Sub
|