A BattleBattle card game simulator in Java

Project maintained by davidyee Hosted on GitHub Pages — Theme by mattgraham

BattleBattle Simulator

A Java simulator for the BattleBattle card game.

Simulator JavaFX Application

Simulator JavaFX Application



There are two main programs in this project:

  1. Run the main program in to run the simulator with a friendly user-interface designed in JavaFX. This interface allows you to change the health and tokens of all the cards that were found on runtime in the com.davidvyee.battlebattlesimulator.card.impl package. You may also customize the number of simulations to run for each combination.

  2. Run the main program in to run each combination of cards in com.davidvyee.battlebattle.simulator.card.impl. The simulator outputs a results CSV file in the same directory as the program and also outputs the CSV content to standard output (stdout). By default, this program will run 1000 simulations per combination.

Packaging the JavaFX Application

Using Maven, you can compile and package the simulator into an executable JavaFX JAR and native executable file by running the following command:

mvn jfx:jar jfx:native

The executable JAR and native application will be located under target\jfx.

Adding New Cards

Add new cards into the com.davidvyee.battlebattle.simulator.card.impl package and override the necessary methods and hooks to achieve the desired card stats and abilities. Cards that are added to this package are found on runtime via Java Reflection.


To debug a new card, create a new JUnit test for the card and change the log4j log level to DEBUG or TRACE:

log4j.rootLogger=TRACE, Console, cardappender

Assumptions and Limitations

The Simulator currently has the following limitations: