A space-themed strategy game built with JavaFX where players compete against AI opponents for control of planetary bases. Developed by Braden Tolman & Sean Ledesma.
- Java Development Kit (JDK) 21 or later
- Apache Maven
- Install Homebrew if you don't have it:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install OpenJDK 21:
brew install openjdk@21
sudo ln -sfn $(brew --prefix)/opt/openjdk@21/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-21.jdk
- Install Maven:
brew install maven
- Clone this repository:
git clone https://github.com/yourusername/cosmic-command.git
cd cosmic-command
- Compile and run:
mvn clean compile
mvn exec:java -Dexec.mainClass="application.Main"
- Verify Java and Maven installation:
java --version
mvn --version
- Make sure you're running the commands from the project root directory
- If you get compilation errors, ensure you have JDK 21 or later set as your Java version
Cosmic Command is a turn-based strategy game where players must conquer space bases while defending against two AI opponents. Each base has troops and health points, and players must strategically choose which bases to attack or defend.
- Turn-based strategic gameplay
- Multiple difficulty settings (Easy, Medium, Hard)
- Two AI opponents with adjustable difficulty
- Resource management (troops and base health)
- Graph-based map layout for strategic depth
-
Starting the Game
- Click "New Game" from the title screen
- Select your preferred difficulty level using the radio buttons
-
Game Controls
- Use "Select" buttons to choose your attacking base
- Use "Attack" buttons to choose your target base
- Click "Next Round" to end your turn
-
Gameplay Mechanics
- Each base starts with health points and troops
- You can only attack bases connected to your current positions
- Troops will automatically regenerate each turn if under the cap
- Win by capturing all enemy bases
- Java 21
- JavaFX for GUI
- Princeton's algs4 library for graph algorithms
- Maven for build management
- Developed by Braden Tolman & Sean Ledesma
- Built using JavaFX and Princeton's algs4 library