Skinney/elm-warrior/4.0.5

Renamed to robinheghan/elm-warrior. It is published under that name, and new versions come out there.

Versions published as Skinney/elm-warrior still install under that name. 15 versions of 15 come from the new location (see their notes).

Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/robinheghan/elm-warrior.

What we checked: The repo moved to github.com/robinheghan/elm-warrior. Rebuilt with git archive from commit e31d20f0d74b of https://github.com/robinheghan/elm-warrior (zip prefix Skinney-elm-warrior-e31d20f/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 2c94d034e1ed55c0eff743cf2ec5ddd2c48d8e34.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/Skinney/elm-warrior/zipball/4.0.5/

Warrior.Program

Contains the essential logic for rendering and defining the game. The Map and Player modules will be of more interest for programming your warrior.

type alias TurnFunction =
Warrior -> Map -> History -> Action

The type signature of a turn function. Turn functions with decide the actions of a Warrior.

type Model

The game model.

type Msg

The game message type.

type alias Config =
{ maps : List Template
, players : List ( String, TurnFunction )
, msPerTurn : Float
, progressionFunction : ProgressionFunction
}

This configuration decides what kind of game you'll play. You can find a bunch of pre-made maps in the Warrior.Maps module, unless you want to make your own. For players you can add a list of ( PlayerName, TurnFunction ). You can decide how long to wait between turns using the msPerTurn field. Finally, the progressionFunction decides when the game is over, or when it is won. You can find some progressionFunctions in Warrior.Maps.Progression.

program : Config -> Program () Model Msg

Start a program with a given config.