robinheghan/elm-warrior/1.0.0

NOTE: the latest version is 1.0.1

Formerly Skinney/elm-warrior. Search finds this package by either name.

Warrior.Map

This module contains functions which allow you look around a map, based on the location of a warrior.

type alias Map =
Map

A map, represented by a grid of tiles.

Search

look : Direction -> Warrior -> Map -> List ( Coordinate, Tile )

Provides a list of everything the warrior can see in a specific direction. The first item of the list will be the one tile away. The second item will be two tiles away, etc.

lookDown : Warrior -> Map -> Tile

Describe what is at the warrior's feet. Usually this will just be empty space, but occasionally you might see an item worth picking up.