From 5e257c3cd894e7fbe350f4e58b8c75824e755a42 Mon Sep 17 00:00:00 2001 From: Aineopintojen-harjoitustyo-Algoritmit-j Date: Sat, 3 Feb 2024 12:09:45 +0200 Subject: Implementing use of readymade board at board.py. --- app.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'app.py') 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 -- cgit v1.2.3