Skip to content

Connect 4 written in JavaFX as a proof of concept.

License

Notifications You must be signed in to change notification settings

megabyte6/connect-4

Repository files navigation

connect-4

About

connect-4 is a fun clone of the board game Connect 4 written in Java.


How to run it.

Option 1: I just wanna play it.

  • Installer instructions:
    • Head to the latest release.
    • Download the latest installer for your system.
    • Run the installer.
    • Have fun! 👍
  • Portable instructions:
    • Head to the latest release.
    • Download the correct .zip for your system.
    • Extract the files.
    • Navigate to the bin folder.
    • Run connect-4 (or connect-4.bat if you're on Windows).

Note:

  • The installers are currently only available for Windows.
  • If you're on Windows and wish to use a portable build, you can use connect4-win-x64-x.x.zip (which ships with a JVM) or connect4-win-x64-portable-x.x.zip (which has a windows executable. This option is recommended).

Option 2: I don't want to install stuff.

Note: This project should be built with JDK 17 but the build script will install it automatically if you don't already have a compatible JDK.

  1. Download this repository with the green Code button.
  2. Navigate to the project folder. You should see a build.gradle file.
  3. Open a terminal in this directory and run ./gradlew run (or gradlew.bat run if you're on Windows Command Prompt) to run the game.

Building this project:

Note: This project should be built with JDK 17 but the build script will install it automatically if you don't already have a compatible JDK.

  1. Download this repository with the green Code button.
  2. Run the build command using one of the following options:
    • Build portable images (this one is easier):
      1. Open gradle.properties and change the jlinkTargetPlatform property to match the OS and architecture you wish to build for.
      2. Run ./gradlew jlinkZip
      3. Check the build folder for the .zip image.
      4. Play it by extracting the zip and running the connect-4 in the bin folder
    • Build installers & executables:
      1. Check Oracle's website for info on your system's prerequisites.
      2. Open gradle.properties and change the jpackageTargetPlatform property to match your operating system and architecture. This must match your current operating system and hardware.
      3. Run ./gradlew jpackage
      4. Check build/jpackage for the installer(s) and build/jpackage/Wordle for the executable(s).

License

This project uses the MIT License.


Thanks

This project was possible due to the following libraries: