Skip to content

Commit

Permalink
Minor refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
humbhenri committed Sep 19, 2010
1 parent 5766579 commit 3e79127
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion othello.py
Expand Up @@ -35,6 +35,7 @@ def get_options( self ):
self.other_player = player.Computer ( WHITE, level+3 ) self.other_player = player.Computer ( WHITE, level+3 )


self.gui.show_game() self.gui.show_game()
self.gui.update(self.board.board, 2, 2)




def run ( self ): def run ( self ):
Expand All @@ -54,7 +55,7 @@ def run ( self ):
if self.board.get_valid_moves( self.now_playing.color ) != []: if self.board.get_valid_moves( self.now_playing.color ) != []:
score, self.board = self.now_playing.get_move() score, self.board = self.now_playing.get_move()
whites, blacks, empty = self.board.count_stones() whites, blacks, empty = self.board.count_stones()
self.gui.update( self.board.board, blacks, whites, self.now_playing.color ) self.gui.update( self.board.board, blacks, whites)
self.now_playing, self.other_player = self.other_player, self.now_playing self.now_playing, self.other_player = self.other_player, self.now_playing
self.gui.show_winner( winner ) self.gui.show_winner( winner )
pygame.time.wait( 1000 ) pygame.time.wait( 1000 )
Expand Down
2 changes: 1 addition & 1 deletion ui.py
Expand Up @@ -265,7 +265,7 @@ def get_mouse_input ( self ):
time.sleep ( .05 ) time.sleep ( .05 )




def update ( self, board, blacks, whites, nowPlayingColor): def update ( self, board, blacks, whites):
"""Updates screen """Updates screen
""" """
for i in range ( 8 ): for i in range ( 8 ):
Expand Down

0 comments on commit 3e79127

Please sign in to comment.