SGE-Risk is a clone of the game "Risk" implemented in SGE.
This program consists of a map generator and a library for agents to play the game.
Add the following to your build.gradle
:
repositories {
maven { url = 'https://jitpack.io' }
}
dependencies {
implementation("com.gitlab.Entze:sge-risk:v1.0.7")
}
./gradlew jar shadowJar sourcesJar javadocJar
This produces four jar files (in build/libs/
):
One executable
sge-risk-1.0.7-exe.jar
(Game-jar & Map Generator Executable)
And three jars usually used for development
sge-risk-1.0.7.jar
(Library)sge-risk-1.0.7-sources.jar
(Sources)sge-risk-1.0.7-javadoc.jar
(Documentation)
Download the prebuilt jar from the GitHub Releases page. The jar is standalone, and therefore it does not need to be installed.
The javadoc provides documentation for all public methods. Otherwise, once the library is installed you should be able to use the Library via the API.
There are also a general agent-guide and a ruleset available.
The map generator compresses the whitespace in map strings.
To use:
java -jar sge-risk-1.0.7-exe.jar [MAPFILE] [TERRITORIESFILE]
The map file is an ascii image. X
s represent the position of the troop indicator. The territories file lists the names
of the territories in order of their appearance in the map file (using the X
as marker, left to right, top to bottom).
The result is printed on stdout.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.