Browse Source

removed old data retrival via socket

feature/balanceutils
informaniac 7 years ago
parent
commit
5cad7825f3
  1. 7
      games/ttrs.py

7
games/ttrs.py

@ -249,13 +249,6 @@ class BalanceTtrsPlayer(TtrsPlayer, threading.Thread): @@ -249,13 +249,6 @@ class BalanceTtrsPlayer(TtrsPlayer, threading.Thread):
oldevt = None
lastchange = 0
while self.running:
sock.send(b'a')
data = sock.recv(4)
p0x, p0y, p1x, p1y = struct.unpack('bbbb', data)
if self.player_id == 0:
xbal, ybal = p0x, p0y
elif self.player_id == 1:
xbal, ybal = p1x, p1y
#print('player_id=%d xbal=%d ybal=%d' % (self.player_id, xbal, ybal))
if xbal == -128 or ybal == -128:

Loading…
Cancel
Save