Skip to content

NipunaMadhushan/connect_4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connect 4

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

Rules

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.

How to play

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.

How to run the game

Prerequisites

  • 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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages