Skip to content

Instantly share code, notes, and snippets.

@0z4ck
Last active June 25, 2018 13:49
Show Gist options
  • Save 0z4ck/d789e6f897fa38d41c33787dd6cce6f6 to your computer and use it in GitHub Desktop.
Save 0z4ck/d789e6f897fa38d41c33787dd6cce6f6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python2
while True:
command = raw_input()
if command == "quit" or command == "exit":
break
elif command == "usi":
print("id name engine27")
print("id author by 0z4ck")
print("option name BookFile type string default public.bin\noption name UseBook type check default true")
print("usiok")
elif command == "isready":
print("readyok")
elif command.split(" ")[0] == "go":
print("bestmove 7g7f")
else:
print("command not known: '{}'".format(command))
#!/usr/bin/env python3
while True:
command = input()
if command == "quit" or command == "exit":
break
elif command == "usi":
print("id name engine36")
print("id author by 0z4ck")
print("option name BookFile type string default public.bin\noption name UseBook type check default true")
print("usiok")
elif command == "isready":
print("readyok")
elif command.split(" ")[0] == "go":
print("bestmove 7g7f")
else:
print("command not known: '{}'".format(command))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment