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

Function get_next_open_row

Connect-Four/main.py:26–30  ·  view source on GitHub ↗
(col)

Source from the content-addressed store, hash-verified

24 current_player = 3 - current_player # Switch player
25
26def get_next_open_row(col):
27 for row in range(ROWS - 1, -1, -1):
28 if board[row][col] == EMPTY:
29 return row
30 return None
31
32def check_winner(row, col):
33 directions = [(0, 1), (1, 0), (1, 1), (-1, 1)]

Callers 1

drop_pieceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected