Build a "Connect Four" game for two players in which the players take turns dropping colored discs from the top into a vertically suspended board/grid.

The objective of the game is to be the first player to form a horizontal, vertical, or diagonal line of four of their own colored discs.

Connect Four example

Requirements

Colors

Feel free to use the following hex values when making your game:

Solution

In the spirit of good software engineering, let's devise a solution that is as customizable as possible. We will build a Connect Four game that works with any numbers of rows, columns, and players. Let these be constants ROWS, COLUMNS, and PLAYERS respectively.