← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Design and implement the backend logic for a two-player Connect Four game. The board is fixed at 7 columns and 6 rows. Players take turns dropping a colored disc into a column; the disc falls to the lowest empty row in that column. The first player to align four of their own discs horizontally, vertically, or diagonally wins. If the board fills up with no winner, the game is a draw. You must expose an API that lets an external caller create a game, query whose turn it is, attempt a move, and ask whether the game has ended (and who won). No UI, move history, or undo support is required.