Ejemplo n.º 1
0
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
        if event.type == pygame.MOUSEBUTTONDOWN:
            pos = pygame.mouse.get_pos()
            
            InputManager.dispatch(pos)
            
            
            

    Board.drawBoard(window)
    
# If gamestate is 0, we will call drawSetup    
    if GameState.s.getGameState() == 0:
        Menu.drawSetup(window)
# if gamestate is 1, we will call drawCustomSetup
    elif GameState.s.getGameState() == 1:
        Menu.drawCustomSetup(window)
# if gamestate is 2, we will call drawGame
    elif GameState.s.getGameState() == 2:
        Menu.drawGame(window)

#If gamestate is not blank, we will draw the winner
    if GameState.s.getcurrentWinner() != "":
        Menu.drawWinner(window)
    
    drawPickedUpPiece()
    pygame.display.flip()
    clock.tick(60) #60 fps