예제 #1
0
 def __init__(self, game, delta = (0,0), position = (0,0), size = (120,20), parent = None, style = None, enabled = True):
     '''
     GoBoardTest Constructor
     '''
     
     self.turn = ""
     
     if (game.next_move == BLACK_COLOR):
         self.turn ="Black "
     else:
         self.turn ="White"
     
     #TODO funcion que cree los star points en funcion al size     
     self.star_points = []
     self.game = game
     self._board_size = game.board.size
     self.create_surfaces()    
     self.delta = delta
     
     defaultStyle.init(gui)
     self.gui = gui
     self.game_over_style = self.gui.gameOverStyle.copy()
     self.turn_style = self.gui.turn_style.copy()
     self.windows = None
     Widget.__init__(self,position,size,parent,style,enabled)    
     Container.__init__(self)
     self.turn_label = None
     self.black_pieces = []
     self.white_pieces = []
예제 #2
0
파일: View.py 프로젝트: jihoonLee/pygo1963
 def __init__(self):
     self.screen = pygame.display.set_mode((800, 600), pygame.DOUBLEBUF)
     self.clock = pygame.time.Clock()
     self.run = True
     self.back = pygame.image.load(BACK_PATH).convert()
     self.desktop = Desktop()
     
     defaultStyle.init(gui)
     self.gui = gui
     
     self.controller = Controller()