Added all the files we need from gnugo to so_compile

This commit is contained in:
Anna Rose 2012-04-12 21:28:49 -04:00
parent c17ed205d7
commit 61d1965292
2 changed files with 16 additions and 8 deletions

View File

@ -54,7 +54,7 @@ class Goban:
Goban.libboard.clear_board() Goban.libboard.clear_board()
def play_move(pos, color): def play_move(self, pos, color):
x,y = pos x,y = pos
realpos = x * 19 + y realpos = x * 19 + y
@ -65,28 +65,28 @@ class Goban:
return False 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.""" """Undo n moves. Return True on success, False on failure. On failure, no moves are removed."""
return Goban.libboard.undo_move(n) 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.""" """Updates our internal cache of the board state. Needed before most accessor functions."""
Goban.libboard.store_board(self.board) Goban.libboard.store_board(self.board)
def _restore_board(): def _restore_board(self):
"""Use our cached board to update libboard's internal state.""" """Use our cached board to update libboard's internal state."""
Goban.libboard.restore_board(self.board) 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. """ Return a pygame.Surface() with an image of the board.
If pygame isn't available, this function prints an error and returns harmlessly.""" If pygame isn't available, this function prints an error and returns harmlessly."""
pass pass
def draw_info(): def draw_info(self):
""" Return a pygame.Surface() with an image of text describing the game state. """ 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.""" If pygame isn't available, this function prints an error and returns harmlessly."""
pass pass

View File

@ -4,7 +4,7 @@ cd gnugo
make make
cd patterns 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/ mv libpatterns.so ../../lib/
cd .. cd ..
@ -13,9 +13,17 @@ gcc -shared -o libsgf.so sgf_utils.o sgfnode.o sgftree.o
mv libsgf.so ../../lib/ mv libsgf.so ../../lib/
cd .. 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 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 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/ 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/ mv libboard.so ../../lib/
cd .. cd ..