|
|
|
@ -243,13 +243,7 @@ class BalanceTtrsPlayer(TtrsPlayer, threading.Thread):
@@ -243,13 +243,7 @@ class BalanceTtrsPlayer(TtrsPlayer, threading.Thread):
|
|
|
|
|
self.start() |
|
|
|
|
|
|
|
|
|
def run(self): |
|
|
|
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
|
|
|
|
try: |
|
|
|
|
sock.connect(self.addr) |
|
|
|
|
except ConnectionRefusedError: |
|
|
|
|
print('could not connect to balance server', file=sys.stderr) |
|
|
|
|
self.evt = PlayerEvent.QUIT |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
self.running = True |
|
|
|
|
evt = None |
|
|
|
|
oldevt = None |
|
|
|
@ -481,6 +475,14 @@ if __name__ == '__main__':
@@ -481,6 +475,14 @@ if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
seed = random.random() |
|
|
|
|
games = [] |
|
|
|
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
|
|
|
|
host, port = args.balance.split(':') |
|
|
|
|
try: |
|
|
|
|
sock.connect(host, port) |
|
|
|
|
except ConnectionRefusedError: |
|
|
|
|
print('could not connect to balance server', file=sys.stderr) |
|
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
|
def start_game(player_id, xpos): |
|
|
|
|
pg = Playground(10, 16) |
|
|
|
|
if args.pygame: |
|
|
|
|