points to prop

This commit is contained in:
Jonas Zeunert
2022-05-07 13:28:54 +02:00
parent beaa4aab99
commit 37a6438c95

View File

@@ -25,7 +25,16 @@ class PlayerState:
display = None
specialDisplay = None
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
bonusMultiplierIter = iter(BONUS_MULTIPLIER)
bonusMultiplier = 1
@@ -225,7 +234,6 @@ class PlayerState:
self.hasBallScored = True
self.points += points
self.display.printScore(self.points)
def addBall(self):
self.ballsLeft += 1