Implementation of a Connect Four game for 2 players using JavaFX, following the Model-View-Controller (MVC) design pattern:
- Model:
ConnectFourLogichandles the game rules, board state, and win conditions. - View: The user interface is defined in the
ConnectFour.fxmlfile. - Controller:
ConnectFourControllermanages user interactions and updates the UI.
To run the game, make sure you have JDK 11 or higher and JavaFX SDK installed. Them from your command line:
Replace
"/path/to/javafx-sdk/lib"with the actual path to your JavaFX SDK lib directory.
# Compile
javac --module-path "/path/to/javafx-sdk/lib" --add-modules javafx.controls,javafx.fxml *.java
# Run
java --module-path "/path/to/javafx-sdk/lib" --add-modules javafx.controls,javafx.fxml ConnectFourApp
