Skip to content
Hunger Games Simulator made in Kotlin
Kotlin Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
game/events
gradle/wrapper
src
.gitignore
LICENSE
README.md
build.gradle
gradlew
gradlew.bat
settings.gradle

README.md

HungerGames

A Hunger Games Simulator Engine made in Kotlin.

Usage

  1. Create an instance of HungerGamesBuilder and configurate the match.
val hungerGames: HungerGames = HungerGamesBuilder()
    ...
    .build()

Look at src/test/kotlin/pw/aru/hungergames/Test.kt for a better example.

  1. Start a new match.
val initialPhase: Phase = hungerGames.newGame()

2.1. You can iterate over the Phases at any time.

for (e: Phase in initialPhase) {
    ...
}
  1. Process the events generated.
when (phase) {
    //Game Start Event
    is Bloodbath -> { ... }
    
    //Regular Events
    is Day -> { ... }
    is FallenTributes -> { ... }
    is Night -> { ... }
    is Feast -> { ... }
    
    //Game End Events
    is Winner -> { ... }
    is Draw -> { ... }
}
You can’t perform that action at this time.