Skinney / elm-warrior / Warrior.Map

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


type alias Map =
Warrior.Internal.Map.Map

A map, represented by a grid of tiles.

Search

look : Warrior.Direction.Direction -> Warrior -> Map -> List ( Warrior.Coordinate.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.