diff --git a/src/rules.py b/src/rules.py index eaca103..f53a32e 100644 --- a/src/rules.py +++ b/src/rules.py @@ -1,8 +1,23 @@ class Rules: def __init__(self): - name = None - nb_row = None - nb_col = None + self.name = None + self.nb_row = None + self.nb_col = None + def check_board_size(self, board: Board) -> Bool: + """ Checks if the board size is correct. + Entries: + self: the Rules class itself + board -> Board: a board + Output: + correct -> Bool: if True, the board size is correct + """ + correct = True - \ No newline at end of file + if not self.nb_col == board.nb_col: + correct = False + + if not self.nb_row == board.nb_row: + correct = False + + return correct