summaryrefslogtreecommitdiff
path: root/doc/codewalk/pig.go
diff options
context:
space:
mode:
authorJohn DeNero <denero@google.com>2012-01-03 12:15:08 +1100
committerAndrew Gerrand <adg@golang.org>2012-01-03 12:15:08 +1100
commitc2b87ce0079a1981f01243886ff01cbc4b3e784d (patch)
tree182cae5b245eb2b809ec8bc2abb793829602126f /doc/codewalk/pig.go
parenta274798d6ec9da6e1b7ba073795a4b3fb381b9b4 (diff)
downloadgo-git-c2b87ce0079a1981f01243886ff01cbc4b3e784d.tar.gz
doc/codewalk/functions.xml: Fix broken function examples
I removed the broken function comparison example and fixed a code highlighting regexp. R=golang-dev, adg CC=golang-dev https://golang.org/cl/5501078
Diffstat (limited to 'doc/codewalk/pig.go')
-rw-r--r--doc/codewalk/pig.go3
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