From a3cc3acb713e16a644c5bd60d8491f99c4b2a7c1 Mon Sep 17 00:00:00 2001 From: Andrés Ambrois Date: Fri, 29 Aug 2008 03:07:11 +0000 Subject: Fixed passing with AI --- (limited to 'gtp.py') diff --git a/gtp.py b/gtp.py index 7484658..a394cda 100644 --- a/gtp.py +++ b/gtp.py @@ -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() -- cgit v0.9.1