- Java 95.2%
- CSS 4.8%
|
|
||
|---|---|---|
| .vscode | ||
| old_diagrams | ||
| src | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| ATTRIBUTION.md | ||
| classdiagram.puml | ||
| LICENSE | ||
| Makefile | ||
| pom.xml | ||
| README.md | ||
Carbonopoly
CSC2058-2526 final submission for Group 46.
Team Members
| Name | Student ID |
|---|---|
| Cádhan Nelis | 40435022 |
| Callum Gilpin | 40439721 |
| Dylan Donaghy | 40441188 |
| Emmet Quinn | 40444856 |
| Fintan Mcivor | 40441512 |
| Matthew Connolly | 40446360 |
| Owen Ryan | 40457809 |
Project Overview
Carbonopoly is a cooperative strategy board game developed in JavaFX. Players work together to manage economic growth while controlling carbon emissions and temperature rise. The game combines property ownership, shared-resource management, climate events, investments, and policy decisions within a turn-based board-game format.
The application supports 2 to 4 players and includes persistent save / load functionality, audio feedback, animated user interfaces, and automated testing for core gameplay and controller behaviour.
Core Gameplay
- Players move around a 32-space board containing property, investment, chance, court, tax, policy, and transport spaces.
- Eco and Carbon properties affect both income and the environmental state of the game.
- A shared mutual fund supports collective interventions such as policy actions.
- Chance cards and law-violation events introduce positive and negative game-state changes.
- The game is won when carbon is below 40% and temperature is stable or falling for 3 consecutive rounds.
- The game is lost if the temperature meter reaches its maximum or if at least half of the players become bankrupt.
Repository Structure
src/main/java: application source codesrc/main/resources: FXML views, CSS, images, audio assets, and JSON contentsrc/test/java: unit and integration testsATTRIBUTION.md: third-party asset attributionpom.xml: Maven project configurationMakefile: convenience commands for common development tasks
Prerequisites
The project requires:
- JDK 25
- Maven 3.9 or newer
JavaFX dependencies are managed through Maven and do not need to be installed separately.
Installation
- Install JDK 25 and ensure
javaandjavacare available on yourPATH. - Install Maven 3.9 or newer by following the Apache Maven Installation Guide, and ensure
mvnis available on yourPATH. - Clone this repository or extract the submission into a working directory.
- Open a terminal in the project root.
- Download dependencies and compile the project:
mvn clean compile
Building the Project
Compile the application with:
mvn clean compile
Alternatively, on Linux:
make all
Running the Application
Start the JavaFX application with:
mvn clean javafx:run
Alternatively, on Linux:
make run
Running the Test Suite
Execute the automated tests with:
mvn clean test
Linux convenience targets:
make test
make test-headless
make test-headless runs the JavaFX tests using xvfb-run, matching the headless setup used in CI.
Saved Game Data
Saved games are written outside the repository as JSON:
- Linux/macOS:
~/.carbonopoly/save.json - Windows:
%APPDATA%\Carbonopoly\save.json
The save location can be overridden with the JVM system property carbonopoly.saves.file.
Continuous Integration
GitLab CI is configured to:
- build the project
- run the automated test suite in a headless JavaFX environment
Attribution
Third-party media and audio credits are listed in ATTRIBUTION.md.