Connect 4 is a two-player connection rack game, in which the players choose a color and then take turns dropping colored tokens into a seven-column, six-row vertically suspended grid. The pieces fall straight down, occupying the lowest available space within the column.
Connect 4 is a solved game. The first player can always win by playing the right moves.
For more information please visit here
The game consists of 7 racks where each can contain maximum 6 tokens. The goal is to be the first to form a horizontal, vertical, or diagonal line of four of one's own tokens. If all the racks are filled completely with tokens where no player has connected 4 tokens, it will be called a draw.
In this game, you play with the computer. Player can choose the rack which is empty or not filled completely by clicking the green button at the top of the rack.
- python 3.x
- numpy (install using
pip install numpy
) - colorama (install using
pip install colorama
) - pillow (install using
pip install pillow
)
Download the source code from here. Then run the Connect 4.py
file in python.
You can also find the windows application in here