from src.networking.Networking import Networking

class PlayerState:
    def __init__(self, id, ballsToPlay, upperPlayfieldTime = 5, bonusTime = 0):
        self.networking = networking
        self.__id = id
        self.__points = 0
        self.ballsLeft = ballsToPlay
        self.upperPlayfieldTime = upperPlayfieldTime
        self.bonusTime = bonusTime

    def addPoints(self, points):
        self.__points += points
        Networking.writeDisplayScore(self.__id, self.__points)

