diff options
author | Andrés Ambrois <andresambrois@gmail.com> | 2008-08-29 03:07:11 (GMT) |
---|---|---|
committer | Andrés Ambrois <andresambrois@gmail.com> | 2008-08-29 03:07:11 (GMT) |
commit | a3cc3acb713e16a644c5bd60d8491f99c4b2a7c1 (patch) | |
tree | 3bbc66befa8e95815ca8197f663b8970cc81b42e /gtp.py | |
parent | d0b9290d7905f5b4e5acde8433fd8a393157270f (diff) |
Fixed passing with AI
Diffstat (limited to 'gtp.py')
-rw-r--r-- | gtp.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -77,7 +77,7 @@ class gnugo: def get_move(self, color): color = self.short_to_long_colors(color) - self.stdin.write('genmove %s\n' % color) + self.stdin.write('kgs-genmove_cleanup %s\n' % color) self.stdin.flush() output = self.stdout.readline() self.stdout.readline() @@ -89,6 +89,13 @@ class gnugo: logger.debug('Generated move %s', output[2:]) return self._coords_to_xy(output[2:]) + def pass_move(self, color): + color = self.short_to_long_colors(color) + self.stdin.write('%s pass\n' % color) + self.stdin.flush() + self.stdout.readline() + self.stdout.readline() + def undo(self): self.stdin.write('undo\n') self.stdin.flush() |