Ejemplo n.º 1
0
    if  gameState.computerMove:
            computerMoveType, tup = getComputerMove(player2, player1, table)
            toSelect = [tup[0]]+tup[1]
            if tup[2] > 0 and tup[2] in table.builds:
                toSelect += table.builds[tup[2]]
            for spot in cardSpots:
                if spot.card in toSelect:
                    spot.select()
                if spot.card == tup[0]:
                    spot.side = "Front"
                
            firstTime = False
            
            gameState.clear()
            gameState.waitCM2 = True



#----------- going through the mouse clicks and key presses -------------#    
    for event in pygame.event.get():
        if event.type == QUIT or (event.type == KEYUP and event.key == K_ESCAPE):
            pygame.quit()
            sys.exit()



        if gameState.gettingMove:
            if (event.type == KEYDOWN and event.key == K_d):
                moveType = "Discard"
                illegalMove = False