|
|
@ -12,12 +12,12 @@ class Rules:
|
|
|
|
Output:
|
|
|
|
Output:
|
|
|
|
correct -> Bool: if True, the board size is correct
|
|
|
|
correct -> Bool: if True, the board size is correct
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
correct = True
|
|
|
|
correct = False
|
|
|
|
|
|
|
|
|
|
|
|
if not self.nb_col == board.nb_col:
|
|
|
|
try:
|
|
|
|
correct = False
|
|
|
|
if self.nb_col == board.nb_col and self.nb_row == board.nb_row :
|
|
|
|
|
|
|
|
correct = True
|
|
|
|
if not self.nb_row == board.nb_row:
|
|
|
|
except Exception:
|
|
|
|
correct = False
|
|
|
|
print("Exception: check_board_size: col and row parameters might are compared to another type")
|
|
|
|
|
|
|
|
|
|
|
|
return correct
|
|
|
|
return correct
|
|
|
|