Connect Four is a game
that anyone
can play for some fun-filled action
.
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of
python
- You have a
Windows/Mac
machine. - You have read the
guide
. (Shorter version of the guide can be found below)
To install Connect Four, follow these steps:
- Clone the repo into your local computer.
- Open the main.py file.
- Enjoy the game.
To use Connect Four, follow these steps:
- You can use your mouse to move the discs above the desired columns.
- On left-click it drops the disc into the column.
- the disc keeps dropping until hits the last chip on the column or bottom of the column.
- Keep dropping discs in this way to get a Four in a Row and WIN!
To contribute to , follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <'change you are requesting'>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin
ConnectFour` - Create the pull request.
Alternatively see the GitHub documentation on creating a pull request.
Thanks to the following people who have contributed to this project:
- [@JQ100] (https://github.com/JQ100)
- @shreyvakil
- Shrey: For the project, I made the board class which basically plays a role in the backend of the game and sets the discs placed at the desired location. I also added a color select screen to it which basically lets the users select whatever color they wish for the project. I also helped Owais set up the main loop of the game.
- Jerry: Created Player, PlayerComputer, and PlayerHuman classes, Created Minimax strategy for computer to choose best move in Player vs Computer mode, optimized get_winner function and added description for get function in Board class
- Guanyu: Designed the wireframes of Homepage and Scoreboard, and optimized timer function to develop Scoreboard class. The wireframe I designed combined the work of other members.
- Nicholas: Created the Leaderboard class to show top players in order, also worked with Guanyu for the Homepage and Scoreboard classes and debugged them.
- Owais: I worked on the Main file which handles all the processes in the game. I implemented the user switching pages such as from choose disc colour to the game. I worked on setting up the scoreboard such as starting the timer and updating player's scores. I implemented the Connect4 game itself which let the players drop discs, see the animation, and play the next move.
This project uses the following license: MIT License.