points to prop
This commit is contained in:
@@ -25,7 +25,16 @@ class PlayerState:
|
|||||||
display = None
|
display = None
|
||||||
specialDisplay = None
|
specialDisplay = None
|
||||||
id = 0
|
id = 0
|
||||||
points = 0
|
_points = 0
|
||||||
|
@property
|
||||||
|
def points(self):
|
||||||
|
return self._points
|
||||||
|
|
||||||
|
@points.setter
|
||||||
|
def points(self, points):
|
||||||
|
self._points = points
|
||||||
|
self.display.printScore(self.points)
|
||||||
|
|
||||||
bonus = 0
|
bonus = 0
|
||||||
bonusMultiplierIter = iter(BONUS_MULTIPLIER)
|
bonusMultiplierIter = iter(BONUS_MULTIPLIER)
|
||||||
bonusMultiplier = 1
|
bonusMultiplier = 1
|
||||||
@@ -225,7 +234,6 @@ class PlayerState:
|
|||||||
self.hasBallScored = True
|
self.hasBallScored = True
|
||||||
|
|
||||||
self.points += points
|
self.points += points
|
||||||
self.display.printScore(self.points)
|
|
||||||
|
|
||||||
def addBall(self):
|
def addBall(self):
|
||||||
self.ballsLeft += 1
|
self.ballsLeft += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user