From 68b2d193c824caf32c2713fea47256b976a68ce6 Mon Sep 17 00:00:00 2001 From: Nemo Date: Sun, 11 Mar 2018 01:48:22 +0530 Subject: [PATCH] 2to3 --- gothok/game.py | 8 ++++---- gothok/init | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gothok/game.py b/gothok/game.py index 3e5dbc4..ec731a0 100644 --- a/gothok/game.py +++ b/gothok/game.py @@ -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 diff --git a/gothok/init b/gothok/init index 815617f..f4905ce 100755 --- a/gothok/init +++ b/gothok/init @@ -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)