summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorAineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi>2024-02-03 12:09:45 +0200
committerAineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi>2024-02-03 12:09:45 +0200
commit5e257c3cd894e7fbe350f4e58b8c75824e755a42 (patch)
treed4b91de28d33453244b8f15e6006089ca5ecbe1c /app.py
parent63f27f918c8e0e6a0ae24e0b9315c2f2f7b49b6f (diff)
Implementing use of readymade board at board.py.
Diffstat (limited to 'app.py')
-rw-r--r--app.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/app.py b/app.py
index b82bf57..cb79568 100644
--- a/app.py
+++ b/app.py
@@ -14,10 +14,13 @@ class App:
# pylint: disable = multiple-statements
if args.intermediate: board_opts['level'] = Level.INTERMEDIATE
if args.expert: board_opts['level'] = Level.EXPERT
- if args.mines: board_opts['mines'] = args.mines
- if args.size:
- board_opts['width'] = args.size[0]
- board_opts['height'] = args.size[1]
+ if args.board:
+ board_opts['board'] = args.board
+ else:
+ if args.mines: board_opts['mines'] = args.mines
+ if args.size:
+ board_opts['width'] = args.size[0]
+ board_opts['height'] = args.size[1]
if args.bot==0: tui_opts['bot'] = None
if args.bot==1: tui_opts['bot'] = SimpleBot