Last active
June 25, 2018 13:49
-
-
Save 0z4ck/d789e6f897fa38d41c33787dd6cce6f6 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
#!/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)) |
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
#!/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