From 61d1965292e80d05bc3d2ff367c85b07dcd36196 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Thu, 12 Apr 2012 21:28:49 -0400 Subject: [PATCH] Added all the files we need from gnugo to so_compile --- lib/goban.py | 12 ++++++------ so_compile | 12 ++++++++++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/goban.py b/lib/goban.py index 70524ec..ae99532 100644 --- a/lib/goban.py +++ b/lib/goban.py @@ -54,7 +54,7 @@ class Goban: Goban.libboard.clear_board() - def play_move(pos, color): + def play_move(self, pos, color): x,y = pos realpos = x * 19 + y @@ -65,28 +65,28 @@ class Goban: return False - def undo_move(n): + def undo_move(self, n): """Undo n moves. Return True on success, False on failure. On failure, no moves are removed.""" return Goban.libboard.undo_move(n) - def _update_board(): + def _update_board(self): """Updates our internal cache of the board state. Needed before most accessor functions.""" Goban.libboard.store_board(self.board) - def _restore_board(): + def _restore_board(self): """Use our cached board to update libboard's internal state.""" Goban.libboard.restore_board(self.board) - def draw_board(): + def draw_board(self, board_size, img_res): """ Return a pygame.Surface() with an image of the board. If pygame isn't available, this function prints an error and returns harmlessly.""" pass - def draw_info(): + def draw_info(self): """ Return a pygame.Surface() with an image of text describing the game state. If pygame isn't available, this function prints an error and returns harmlessly.""" pass diff --git a/so_compile b/so_compile index a109576..dee4b1b 100755 --- a/so_compile +++ b/so_compile @@ -4,7 +4,7 @@ cd gnugo make cd patterns -gcc -shared -o libpatterns.so conn.o patterns.o apatterns.o dpatterns.o eyes.o influence.o barriers.o endgame.o aa_attackpat.o owl_attackpat.o owl_vital_apat.o owl_defendpat.o fusekipat.o fuseki9.o fuseki13.o fuseki19.o josekidb.o handipat.o oraclepat.o mcpat.o +gcc -shared -o libpatterns.so connections.o helpers.o transform.o conn.o patterns.o apatterns.o dpatterns.o eyes.o influence.o barriers.o endgame.o aa_attackpat.o owl_attackpat.o owl_vital_apat.o owl_defendpat.o fusekipat.o fuseki9.o fuseki13.o fuseki19.o josekidb.o handipat.o oraclepat.o mcpat.o mv libpatterns.so ../../lib/ cd .. @@ -13,9 +13,17 @@ gcc -shared -o libsgf.so sgf_utils.o sgfnode.o sgftree.o mv libsgf.so ../../lib/ cd .. +cd utils +gcc -shared -o libutils.so getopt.o getopt1.o random.o gg_utils.o winsocket.o +mv libutils.so ../../lib/ +cd .. + cd engine gcc -shared -o libengine.so aftermath.o board.o boardlib.o breakin.o cache.o clock.o combination.o dragon.o endgame.o filllib.o fuseki.o genmove.o globals.o handicap.o hash.o influence.o interface.o matchpat.o montecarlo.o move_reasons.o movelist.o optics.o oracle.o owl.o persistent.o printutils.o readconnect.o reading.o semeai.o sgfdecide.o sgffile.o shapes.o showbord.o surround.o unconditional.o utils.o value_moves.o worm.o mv libengine.so ../../lib/ -gcc -shared -L../../lib/ -lengine -lpatterns -lsgf -o libboard.so board.o boardlib.o hash.o printutils.o +cd .. + +cd engine +gcc -shared -L../../lib/ -lengine -lpatterns -lsgf -lutils -o libboard.so board.o boardlib.o hash.o printutils.o mv libboard.so ../../lib/ cd ..