本文整理汇总了Python中GameState.GameState.waitCM2方法的典型用法代码示例。如果您正苦于以下问题:Python GameState.waitCM2方法的具体用法?Python GameState.waitCM2怎么用?Python GameState.waitCM2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameState.GameState
的用法示例。
在下文中一共展示了GameState.waitCM2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getComputerMove
# 需要导入模块: from GameState import GameState [as 别名]
# 或者: from GameState.GameState import waitCM2 [as 别名]
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