diff options
Diffstat (limited to 'app.py')
-rw-r--r-- | app.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -7,8 +7,14 @@ from bots import BadBot # pylint: disable = too-few-public-methods class App: """ App - Luokka pääohjelmalle""" - def __init__(self): - self.board = Board(level=Level.BEGINNER) + def __init__(self, args=None): + level=Level.BEGINNER + if args: + level = Level.EXPERT if args.expert else level + level = Level.INTERMEDIATE if args.intermediate else level + level = Level.BEGINNER if args.beginner else level + + self.board = Board(level=level) self.bot = BadBot() self.ui = Tui(self.bot) self.game = Game(self.board,self.ui) |