diff options
author | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-02-03 12:09:45 +0200 |
---|---|---|
committer | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-02-03 12:09:45 +0200 |
commit | 5e257c3cd894e7fbe350f4e58b8c75824e755a42 (patch) | |
tree | d4b91de28d33453244b8f15e6006089ca5ecbe1c /__main__.py | |
parent | 63f27f918c8e0e6a0ae24e0b9315c2f2f7b49b6f (diff) |
Implementing use of readymade board at board.py.
Diffstat (limited to '__main__.py')
-rw-r--r-- | __main__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/__main__.py b/__main__.py index c2497ca..6dad3f8 100644 --- a/__main__.py +++ b/__main__.py @@ -4,6 +4,8 @@ from app import App from cmdline import args +vars(args)['board'] = None + if args.count is None and args.file is None: app = App(args) is_win = app.run() @@ -11,9 +13,9 @@ if args.count is None and args.file is None: sys.exit(not is_win) # Exit koodeissa 0 on onnistunut suoritus win_count = 0 -args.autoplay = 2 if args.file is None: + args.autoplay = 2 run_count = args.count for i in range(run_count): print(end=f" \rSuoritus {i+1:>6}/{run_count} ") @@ -32,8 +34,7 @@ else: line = bfile.readline() if not line or (line[0]!='.' and line[0]!='@'): if board: - args_dict = vars(args) - args_dict['board'] = board + args.board = board app = App(args) win_count += app.run() run_count += 1 |