summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app.py b/app.py
index 1770c25..6a2b00a 100644
--- a/app.py
+++ b/app.py
@@ -1,6 +1,6 @@
""" app.py - pääohjelma """
from board import Board, Level
-from tui import Tui
+from tui import Tui, AutoTui
from game import Game
from bots import BadBot
@@ -9,14 +9,16 @@ class App:
""" App - Luokka pääohjelmalle"""
def __init__(self, args=None):
level=Level.BEGINNER
+ ui_class=Tui
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
+ ui_class = AutoTui if args.auto else ui_class
self.board = Board(level=level)
self.bot = BadBot()
- self.ui = Tui(self.bot)
+ self.ui = ui_class(self.bot)
self.game = Game(self.board,self.ui)
def run(self):