Add player choosing
This commit is contained in:
@@ -3,11 +3,14 @@ from PlayerState import PlayerState
|
||||
from displays.DummyDisplay import DummyDisplay
|
||||
|
||||
class PlayerStateFactory:
|
||||
def __init__(self, specialDisplay):
|
||||
def __init__(self, specialDisplay, banks, displayFactory):
|
||||
self.specialDisplay = specialDisplay
|
||||
self.banks = banks
|
||||
self.displayFactory = displayFactory
|
||||
|
||||
def createPlayerState(self, display, id, banks):
|
||||
return PlayerState(display, self.specialDisplay, id, BALLS_PER_GAME, banks)
|
||||
def createPlayerState(self, id):
|
||||
display = self.displayFactory.createPlayerDisplay(id)
|
||||
return PlayerState(display, self.specialDisplay, id, BALLS_PER_GAME, self.banks)
|
||||
|
||||
def createDummyPlayerState(self):
|
||||
display = DummyDisplay()
|
||||
|
||||
Reference in New Issue
Block a user