From 823877510422f6ce2952de5cc40edd0d62d813e4 Mon Sep 17 00:00:00 2001 From: Aineopintojen-harjoitustyo-Algoritmit-j Date: Wed, 17 Jan 2024 10:51:08 +0200 Subject: Adding BadBot for hinting. --- board/board.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'board/board.py') diff --git a/board/board.py b/board/board.py index 0b4c3a2..b6bd25b 100644 --- a/board/board.py +++ b/board/board.py @@ -7,7 +7,7 @@ class Board(): """ Board - Luokka joka pitää huolen pelilaudasta ja siihen kohdistuvista siirroista. """ - def __init__(self, size = 10, bombs = 0): + def __init__(self, size = 9, bombs = 10): # Lauta pitää olla vähintään 2x2, jotta on jotain pelattavaa size = 2 if size < 2 else size size = 50 if size > 50 else size @@ -29,7 +29,7 @@ class Board(): def initialize_tiles(self, size): """ alustaa pelilaudan matriisit """ self.tiles = [[0 for _ in range(size)] for _ in range(size)] - self.masked = [[10 for _ in range(size)] for _ in range(size)] + self.masked = [[12 for _ in range(size)] for _ in range(size)] def randomize_bombs(self, bomb_count): -- cgit v1.2.3