Skip to content

Instantly share code, notes, and snippets.

@arwagner
Created March 16, 2013 00:55
Show Gist options
  • Save arwagner/5174376 to your computer and use it in GitHub Desktop.
Save arwagner/5174376 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
i = 0
moves = ["a7a6","a6a5","a5a4","a4a3"]
ARGF.each do |command|
if command.start_with?("protover")
$stdout.puts "feature ping=0 setboard=1 ics=1 usermove=1"
elsif command.start_with?("usermove")
$stdout.puts "move #{moves[i]}"
i+=1
end
$stdout.flush
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment