2to3
This commit is contained in:
parent
69618c2a1f
commit
68b2d193c8
|
@ -28,8 +28,8 @@ class State():
|
|||
def getPossibleMoves(self):
|
||||
moves = []
|
||||
|
||||
for x in xrange(0, 5):
|
||||
for y in xrange(0, 5):
|
||||
for x in range(0, 5):
|
||||
for y in range(0, 5):
|
||||
|
||||
if (self.isLegalMoveLocation(x, y)):
|
||||
moves.append((x, y))
|
||||
|
@ -116,7 +116,7 @@ class GameNode(object):
|
|||
state = self.state
|
||||
|
||||
while not state.gameOver:
|
||||
moves = state.getPossibleMoves
|
||||
moves = state.getPossibleMoves()
|
||||
randomMove = random.choice(possibleMoves)
|
||||
state.playMove(randomMove)
|
||||
|
||||
|
@ -173,6 +173,6 @@ initial_state = game.State.read_packed(f)
|
|||
|
||||
# print(initial_state)
|
||||
s = State(initial_state)
|
||||
print(s.getPossibleMoves())
|
||||
print((s.getPossibleMoves()))
|
||||
|
||||
# 3,2
|
||||
|
|
|
@ -12,8 +12,8 @@ state = game.State.new_message()
|
|||
houses = ["empty", "varys", "tully", "tyrell", "baratheon", "targaryen", "lannister", "greyjoy", "stark"]
|
||||
cards = []
|
||||
|
||||
for x in xrange(1, 9):
|
||||
for y in xrange(0, x):
|
||||
for x in range(1, 9):
|
||||
for y in range(0, x):
|
||||
card = game.Card.new_message()
|
||||
card.house = houses[x]
|
||||
cards.append(card)
|
||||
|
|
Loading…
Reference in New Issue