| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/struct/battlemap.erl')
| -rw-r--r-- | src/struct/battlemap.erl | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/src/struct/battlemap.erl b/src/struct/battlemap.erl index 76f8fd4..8f85bbb 100644 --- a/src/struct/battlemap.erl +++ b/src/struct/battlemap.erl @@ -81,14 +81,20 @@ get_height (Battlemap) -> Battlemap#battlemap.height.  -spec get_tile_ids (struct()) -> array:array(tile:id()).  get_tile_ids (Battlemap) -> Battlemap#battlemap.tile_ids. --spec random (id(), non_neg_integer(), non_neg_integer()) -> struct(). +-spec random +   ( +      non_neg_integer(), +      non_neg_integer(), +      non_neg_integer() +   ) +   -> struct().  random (ID, Width, Height) ->     InitialTile = tile:random_id(),     TileIDs = generate_random_tile_ids(InitialTile, [], Width, Height, Width),     #battlemap     { -      id = ID, +      id = list_to_binary(integer_to_list(ID)),        width = Width,        height = Height,        tile_ids = array:from_list(TileIDs) | 


