Browse Source

balance_util is created and used to create the BalanceTtrsPlayer

feature/balanceutils
informaniac 7 years ago
parent
commit
81de8409f2
  1. 4
      games/ttrs.py

4
games/ttrs.py

@ -475,11 +475,11 @@ if __name__ == '__main__': @@ -475,11 +475,11 @@ if __name__ == '__main__':
def start_game(player_id, xpos):
pg = Playground(10, 16)
balance_util = blup.balance_util.BalanceUtil(sock, player_id)
if args.pygame:
player = TestTtrsPlayer(pg)
elif args.balance is not None:
host, port = args.balance.split(':')
player = BalanceTtrsPlayer(pg, (host, int(port)), player_id)
player = BalanceTtrsPlayer(pg, balance_util)
rnd = random.Random(seed)
game = TtrsGame(pg, player, rnd)
painter.add_game(game, xpos, 0)

Loading…
Cancel
Save