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
This commit is contained in:
John DeNero 2012-01-03 12:15:08 +11:00 committed by Andrew Gerrand
parent a274798d6e
commit c2b87ce007
2 changed files with 1 additions and 14 deletions

View file

@ -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