Code an implementation of the game Connect Four that can be played by 2 players.
Video description of Connect Four
From Wikipedia:
Connect Four is a two-player connection game in which the players first choose a color and then take turns dropping one colored disc from the top into a seven-column, six-row vertically suspended grid. The pieces fall straight down, occupying the lowest available space within the column. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one's own discs. Connect Four is a solved game. The first player can always win by playing the right moves.
If you are feeling ambitious you can also support single player mode where the player competes against the computer.
Try to decouple the game logic from UI presentation so that different UI implementations can connected.
A simple non-graphical user interface that executes in a terminal is sufficient for this challenge.