]> Cypherpunks.ru repositories - gostls13.git/commit
solitaire: an exercise in backtracking and string conversions
authorRobert Griesemer <gri@golang.org>
Fri, 3 Sep 2010 17:52:45 +0000 (10:52 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 3 Sep 2010 17:52:45 +0000 (10:52 -0700)
commite5cf760e8a128aa56a2be0752b8cbf30e804408b
tree1b02b33467bf3417034f33986734f394f19b4ac6
parente11bcc88f5796a872249e3968a07f79c5c517b37
solitaire: an exercise in backtracking and string conversions

Solves the (English) peg solitaire game. The board is represented
by a 1-dimensional array for easy representation of directions
with a single integer. The board's contents are chosen such that
it can be printed with a direct string() conversion.

R=r
CC=adg, golang-dev
https://golang.org/cl/2066042
test/solitaire.go [new file with mode: 0644]