An open API service indexing awesome lists of open source software.

https://github.com/bearlike/connect-4

:video_game: Connect Four (also known as 4-in-a-row) is an exciting two-player puzzle connection game recreated with PyGame and Python.
https://github.com/bearlike/connect-4

connect-four gamespy

Last synced: over 1 year ago
JSON representation

:video_game: Connect Four (also known as 4-in-a-row) is an exciting two-player puzzle connection game recreated with PyGame and Python.

Awesome Lists containing this project

README

          

Connect-4
============
[![Language](https://img.shields.io/badge/language-python-blue.svg?style=flat
)](https://www.python.org)
[![Module](https://img.shields.io/badge/module-pygame-brightgreen.svg?style=flat
)](http://www.pygame.org/news.html)
[![Release](https://img.shields.io/badge/release-v1.0-orange.svg?style=flat
)](https://github.com/KrishnaAlagiri/Connect-4#connect-4)

About
-----
Connect Four is a two-player connection game in which the players first choose a colour and then take turns dropping one coloured disc from the top into a seven-column, six-row vertically suspended grid. The pieces fall straight down, occupying the next 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.

The board size can be adjusted by changing values of `board_width` and `board_height` in program (default set to 4x6). Similarly, the PyGame window size can be adjusted by changing values of `window_width` and `window_height` (default set to 640x480).

Also feel free to pass on remarks and suggestions to increase the quality of the code.

Prerequisites
--------------
What things you need to run the program:
- Python Compiler (3.7 Recommended)
- Install **PyGame** from pypi by using the following commands:
```bash
pip install PyGame
```

How To Play
------------
- If you have the correct version of Python and Pygame installed, you can run the program in the command prompt / terminal.
``` bash
cd connect-4
python Connect4_Game.py
```
- Drag and drop coins at the column you want to make a move.
- Use the terminal window to view moments and other details.

**Note:** If you're using Python 3, replace the command "python" with "python3"