Skinney/elm-warrior/4.0.1

NOTE: the latest version is 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 4ba4923ae490 of https://github.com/robinheghan/elm-warrior (zip prefix Skinney-elm-warrior-4ba4923/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 99be372d532fdd34e34c220fc6284db2fece676e.

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

Warrior.Map.Tile

A map is built of several tiles. You can use this module to get a better idea of how the map is made up.

type Tile
= Wall
| Empty
| SpawnPoint
| Exit
| Warrior String
| Item Item

Describes what is on a specific coordinate of a map.

Predicates

Sometimes a pattern match is a bit much when all you want is the answer to a simple question. So here are simple predicate functions that make it easy to answer the most basic question about a tile.

isWall : Tile -> Bool

True if the given Tile is a Wall

isEmpty : Tile -> Bool

True if the given Tile represents Empty space

isSpawnPoint : Tile -> Bool

True if the given Tile is a spawn point

isExit : Tile -> Bool

True if the given Tile is an exit point

isWarrior : Tile -> Bool

True if the given Tile represents another warrior

isItem : Tile -> Bool

True if the given Tile represents an item

canMoveOnto : Tile -> Bool

True if a warrior can move to this tile with a move action.