Created
January 30, 2012 08:42
-
-
Save ptn/1703380 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run from bin/testbot | |
Draughts::AI::Board.each do |b| | |
Draughts::AI::Move.each do |m| | |
['black', 'white'].each do |c| | |
p = Draughts::AI::Play.first(board: b, move: m, color: c) | |
if p | |
result = p.legal | |
Draughts::AI::Play.all(board: b, move: m, color: c).destroy | |
Draughts::AI::Play.create(board: b, move: m, color: c, legal: result) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment