Commit ea98e4b5 authored by Roger Peppe's avatar Roger Peppe Committed by Russ Cox

changes necessary to get the new chameneosredux onto shootout.alioth.debian.org .

it's now there: http://shootout.alioth.debian.org/u32q/benchmark.php?test=chameneosredux&lang=all&box=1!

R=r, rsc
CC=golang-dev
https://golang.org/cl/167043
parent f91cd447
...@@ -101,13 +101,13 @@ func main() { ...@@ -101,13 +101,13 @@ func main() {
fmt.Printf("%s + %s -> %s\n", colname[c0], colname[c1], colname[complement[c0|c1<<2]]) fmt.Printf("%s + %s -> %s\n", colname[c0], colname[c1], colname[complement[c0|c1<<2]])
} }
} }
fmt.Print("\n");
pallmall([]int{blue, red, yellow}); pallmall([]int{blue, red, yellow});
pallmall([]int{blue, red, yellow, red, yellow, blue, red, yellow, red, blue}); pallmall([]int{blue, red, yellow, red, yellow, blue, red, yellow, red, blue});
} }
func pallmall(cols []int) { func pallmall(cols []int) {
fmt.Print("\n");
// invariant: meetingplace always contains a value unless a creature // invariant: meetingplace always contains a value unless a creature
// is currently dealing with it (whereupon it must put it back). // is currently dealing with it (whereupon it must put it back).
...@@ -126,9 +126,9 @@ func pallmall(cols []int) { ...@@ -126,9 +126,9 @@ func pallmall(cols []int) {
for _ = range (cols) { for _ = range (cols) {
result := <-ended; result := <-ended;
tot += result.met; tot += result.met;
fmt.Println(result.met, spell(result.same, true)); fmt.Printf("%v%v\n", result.met, spell(result.same, true));
} }
fmt.Println(spell(tot, true)); fmt.Printf("%v\n\n", spell(tot, true));
} }
// in this function, variables ending in 0 refer to the local creature, // in this function, variables ending in 0 refer to the local creature,
......
...@@ -26,3 +26,4 @@ yellow + yellow -> yellow ...@@ -26,3 +26,4 @@ yellow + yellow -> yellow
120 zero 120 zero
120 zero 120 zero
one two zero zero one two zero zero
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment