Ejemplo n.º 1
0
 def __init__(self):
     self.instructions_ = Instructions.Instructions("instructions_pl.txt",
                                                    "Instrukcje gry")
     self.instructions_.show_instructions()
     self.chess_engine_ = ChessEngine.ChessEngine(True)
     self.gui_ = GUI.GUI()
     self.converter_ = ChessConverter.ChessConverter()
Ejemplo n.º 2
0
        self.isSelect = False
    def __createChessImage(self):
        return pygame.image.load(self.chessImage[self.chess_value]).convert()
 
                  
def input(events,board,boardWindow,chessEngine): 
    for event in events: 
        if event.type == QUIT: 
            sys.exit(0) 
        elif event.type == MOUSEBUTTONDOWN:
            boardWindow.boardClick(pygame.mouse.get_pos(),boardPhase,board,chessEngine)
            return
        else: 
            pass
         

pygame.init() 
boardWindow = BoardWindow()
board = Board()
boardPhase = BoardPhase(board)
boardWindow.drawBoard(board,boardPhase)
chessEngine =  ChessEngine()
flag =  boardPhase.isChecked(board)
print flag
while True: 
    input(pygame.event.get(),board,boardWindow,chessEngine)
    boardWindow.drawBoard(board,boardPhase)
    pygame.display.flip()