summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-02-23 11:35:45 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-02-23 11:35:45 +0100 |
commit | acf9e9f1eb880ffb8ab918c40724eda566aefcc7 (patch) | |
tree | efa3dd6c88d7970632fbe44f322d03b983b02768 /src/type/battlemap.erl | |
parent | 43e38e5fc54fd58e8230b2b5198b6d8cb625803c (diff) |
Starting a big refactoring...
Diffstat (limited to 'src/type/battlemap.erl')
-rw-r--r-- | src/type/battlemap.erl | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/type/battlemap.erl b/src/type/battlemap.erl deleted file mode 100644 index f55aadb..0000000 --- a/src/type/battlemap.erl +++ /dev/null @@ -1,60 +0,0 @@ --module(battlemap). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --record -( - battlemap, - { - id, - width, - height, - content, - instances - } -). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%% Accessors --export -( - [ - get_id/1, - get_width/1, - get_height/1, - list_tiles/1, - get_instances/1 - ] -). - -%%%% Utils --export -( - [ - cross/5, - dist/2 - ] -). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%% Accessors -get_id (Battlemap) -> Battlemap#battlemap.id. -get_width (Battlemap) -> Battlemap#battlemap.width. -get_height (Battlemap) -> Battlemap#battlemap.height. -list_tiles (Battlemap) -> array:sparse_to_list(Battlemap#battlemap.content). -get_instances (Battlemap) -> Battlemap#battlemap.instances. - -%%%% Utils --include("battlemap/cross_5.erl"). - -dist ({OX, OY}, {DX, DY}) -> - (abs(OX - DX) + abs(OY - DY)). |