From 9c2d3cb33a978e2c9558fb6400692721235b326e Mon Sep 17 00:00:00 2001 From: informaniac Date: Fri, 1 Dec 2017 17:37:05 +0100 Subject: [PATCH] removed socket retrieval function --- games/balancep0ng.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/games/balancep0ng.py b/games/balancep0ng.py index 438816d..700eb79 100755 --- a/games/balancep0ng.py +++ b/games/balancep0ng.py @@ -73,18 +73,6 @@ def convertPixels(dimension, pixels, invert=False): p.append(row) return p -def get_balance_from_sock(sock, player_id): - print('will balance haben...') - sock.send(b'a') - data = sock.recv(4) - p1x, p1y, p2x, p2y = struct.unpack('bbbb', data) - if player_id == 0: - bal = p1y - elif player_id == 1: - bal = p2y - print('balance id=%s balance=%d' % (player_id, bal)) - return bal - class BalanceBoardPlayer(object): def __init__(self, playground, ownPaddle, wiimote_sock, player_id): self.__playground = playground