| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/shim/battlemap_shim.erl')
| -rw-r--r-- | src/shim/battlemap_shim.erl | 64 | 
1 files changed, 0 insertions, 64 deletions
| diff --git a/src/shim/battlemap_shim.erl b/src/shim/battlemap_shim.erl deleted file mode 100644 index b19a653..0000000 --- a/src/shim/battlemap_shim.erl +++ /dev/null @@ -1,64 +0,0 @@ --module(battlemap_shim). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --record -( -   battlemap, -   { -      id, -      width, -      height, -      content, -      instances -   } -). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export -( -   [ -      generate_random/0 -   ] -). - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -generate(_Prev, Result, _X, 0, _BaseWidth) -> -   Result; -generate(Prev, Result, 0, Y, BaseWidth) -> -   generate(Prev, Result, BaseWidth, (Y - 1), BaseWidth); -generate(Prev, Result, X, Y, BaseWidth) -> -   case rand:uniform(100) of -      N when (N >= 10) -> -         generate(Prev, [Prev|Result], (X - 1), Y, BaseWidth); - -      N -> -         NewTileType = (N - 1), -         generate -         ( -            NewTileType, -            [NewTileType|Result], -            (X - 1), -            Y, -            BaseWidth -         ) -   end. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -generate_random () -> -   Width = (rand:uniform(48) + 16), -   Height = (rand:uniform(48) + 16), -   #battlemap -   { -      id = <<"0">>, -      width = Width, -      height = Height, -      content = array:from_list(generate(0, [], Width, Height, Width)) -   }. | 


