This is a Java program that implements the classic Connect 4 game using an interface and Java GUI. The user can play against a computer opponent, whose logic was implemented by me. The objective of the game is to get four of your colored circles in a line, either horizontally, vertically, or diagonally.
Notice the logic is written in such a way, the computer opponent will try to block the user from winning. However, to keep the game fun, it will ignore occasionally.
- Implementing interfaces and abstract classes in Java
- Designing and implementing the logic for a computer opponent
- Working with Java GUI elements, such as buttons and labels
- Testing and debugging code to ensure it is functioning correctly
Ensure that you have the latest version of Java installed on your computer.
javac -d bin src\*.java
java -cp bin\ Main
Follow the prompts in the GUI to play the game.