feat(ai): add complete_lines

This commit is contained in:
Kristofers Solo 2024-01-09 20:29:16 +02:00
parent 00da10e482
commit 5c0d07ba15

View File

@ -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)))