Files
horse/horse/global/scenario.kk
T

39 lines
1019 B
Plaintext

module horse/global/scenario
// Automatically generated with horsegen; DO NOT EDIT
import horse/game-id
// Enumeration of all scenarios for type-safe programming.
pub type scenario
URA-Finale
Unity-Cup
// Get the scenario ID for a scenario.
pub fun scenario-id(s: scenario): scenario-id
match s
URA-Finale -> Scenario-id(1)
Unity-Cup -> Scenario-id(2)
// List of all scenarios in ID order for easy iterating.
pub val all = [
URA-Finale,
Unity-Cup,
]
// Get the name for a scenario.
// If no scenario matches the ID, the result contains the numeric ID.
pub fun show(s: scenario-id): string
match s.game-id
1 -> "URA Finale"
2 -> "Unity Cup"
x -> "scenario " ++ x.show
// Get the full title for a scenario, e.g. "The Beginning: URA Finale".
// If no scenario matches the ID, the result contains the numeric ID.
pub fun title(s: scenario-id): string
match s.game-id
1 -> "The Beginning: URA Finale"
2 -> "Unity Cup: Shine On, Team Spirit!"
x -> "scenario " ++ x.show