Skip to content
/ sge-risk Public

🎲 A clone of the game "Risk" implemented in sge.

License

Notifications You must be signed in to change notification settings

Entze/sge-risk

Repository files navigation

SGE-Risk

Gradle 8.13 Java

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.

Installation

Gradle

Add the following to your build.gradle:

repositories {
    maven { url = 'https://jitpack.io' }
}

dependencies {
    implementation("com.gitlab.Entze:sge-risk:v1.0.7")
}

From Source

./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)

Map Generator

Prebuilt Jar

Download the prebuilt jar from the GitHub Releases page. The jar is standalone, and therefore it does not need to be installed.

From Source

See Installation>From Source.

Usage

Library

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.

Map Generator

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. Xs 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.

Contributing

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.

License

AGPL-3.0

About

🎲 A clone of the game "Risk" implemented in sge.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages