Browse Source

BalanceBoardPlayer now needs a balance_util instead of the wiimote_socket and player_id

also renamed ownPaddle to own_paddle to make it PEP8 compatible
feature/balanceutils
informaniac 7 years ago
parent
commit
6da1b8cf13
  1. 8
      games/balancep0ng.py

8
games/balancep0ng.py

@ -74,15 +74,13 @@ def convertPixels(dimension, pixels, invert=False):
return p return p
class BalanceBoardPlayer(object): class BalanceBoardPlayer(object):
def __init__(self, playground, ownPaddle, wiimote_sock, player_id): def __init__(self, playground, own_paddle, balance_util):
self.__playground = playground self.__playground = playground
self.__ownPaddle = ownPaddle self.__ownPaddle = own_paddle
self.__wiimote = wiimote_sock
self.__ready = False self.__ready = False
self.__playground.addGameTickCallback(self.gametickcb) self.__playground.addGameTickCallback(self.gametickcb)
self.__wiimote_sock = wiimote_sock self.__balance_util = balance_util
self.__player_id = player_id
@property @property
def ownPaddle(self): def ownPaddle(self):

Loading…
Cancel
Save