diff options
Diffstat (limited to 'doc/codewalk/pig.go')
-rw-r--r-- | doc/codewalk/pig.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/doc/codewalk/pig.go b/doc/codewalk/pig.go index b3f02aff1e..10963b4e40 100644 --- a/doc/codewalk/pig.go +++ b/doc/codewalk/pig.go @@ -61,9 +61,6 @@ func play(strategy0, strategy1 strategy) int { currentPlayer := rand.Intn(2) // Randomly decide who plays first for s.player+s.thisTurn < win { action := strategies[currentPlayer](s) - if action != roll && action != stay { - panic(fmt.Sprintf("Player %d is cheating", currentPlayer)) - } s, turnIsOver = action(s) if turnIsOver { currentPlayer = (currentPlayer + 1) % 2 |