Connect 4: An object-oriented game with linked lists, files & classes.
Explore the docs »
View Demo
.
Issues
.
Discussions
Connect 4 is a fun and challenging game that was created for an object-oriented class, showcasing the implementation of linked lists, files, and classes. Some parts of the code were adapted from Connect4 Game Solver, originally developed by Pascal Pons contact@gamesolver.org, and available at http://connect4.gamesolver.org.
The game offers a classic and engaging experience, allowing players to drop colored discs (usually red and yellow) into a vertically suspended grid. The objective is to be the first player to connect four discs of the same color in a row, either horizontally, vertically, or diagonally, while preventing the opponent from doing the same.
The use of object-oriented principles in the code makes it modular and easy to maintain. Players can enjoy the game at four different difficulty levels, each offering its unique challenge. The computer AI presents strategic gameplay, providing an exciting and rewarding experience for players of all ages.
Connect 4 demonstrates the power of object-oriented programming, where linked lists, file handling, and classes come together to create an enjoyable and interactive gaming experience.
To enjoy this game, simply download the .exe file and run it. Please note that the game will generate text files to store game information, so it's advisable to place the .exe file in its own folder for organization
You must have a C++ compiler.
-
You must have a C++ compiler. If you don't have any you can download TDM-GCC
-
Clone the repo
git clone https://github.com/your_username_/Project-Name.git- Make your changes and compile by using
makeHere are the main instructions:
1.Choose an operation mode by pressing a number from [0-4]. 2.If starting a new game, select a difficulty level or the multiplayer mode. 3.If returning to a previous game, continue playing right where you left off. 4.Alternatively, click any button to proceed.
When playing, use the following controls: 1.Press any number in [1-7] to place your piece in the corresponding column. 2.Press 0 to undo one or more moves if needed. 3.Press 9 to redo previously deleted moves.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
- Please make sure you check your spelling and grammar.
- Create individual PR for each suggestion.
- Fork the Project
- Create your Feature Branch
git checkout -b feature/AmazingFeature- Commit your Changes
git commit -m "Added some AmazingFeature" -m "This is the AmazingFeature Description"- Push to the Branch
git push origin feature/AmazingFeature- Open a Pull Request
- Rafa - Computer Science Student
- Casca - Computer Science Student
