MCPcopy Create free account
hub / github.com/ndleah/python-mini-project / check_line

Function check_line

Connect-Four/main.py:40–47  ·  view source on GitHub ↗
(row, col, delta_row, delta_col)

Source from the content-addressed store, hash-verified

38 return False
39
40def check_line(row, col, delta_row, delta_col):
41 count = 0
42 while 0 <= row + delta_row < ROWS and 0 <= col + delta_col < COLS and \
43 board[row][col] == board[row + delta_row][col + delta_col]:
44 count += 1
45 row += delta_row
46 col += delta_col
47 return count
48
49def draw_board():
50 canvas.delete("all") # Clear previous drawings

Callers 1

check_winnerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected