Implement the Connect 4 game
Asked in the technical phone screen stage. Visible fragment; details hidden behind points wall.
Implement def connect_four(moves):. moves is a list of zero-based column indices for a standard 6-row by 7-column board. Players alternate, with player 1 moving first. Each piece falls to the lowest available row in its column. Return 1 or 2 when that player first connects four horizontally, vertically, or diagonally. Return 0 if the moves end without a winner.
def connect_four(moves):