diff --git a/src/ai/heuristics/lines.py b/src/ai/heuristics/lines.py index d1285e7..01d9061 100644 --- a/src/ai/heuristics/lines.py +++ b/src/ai/heuristics/lines.py @@ -2,4 +2,13 @@ import numpy as np def complete_lines(field: np.ndarray[int, np.dtype[np.uint8]]) -> int: - return 0 + """ + Calculates the number of complete lines in the field. + + Args: + field: 2D array representing the game field. + + Returns: + The number of complete lines in the field. + """ + return int(np.sum(np.all(field, axis=1)))