summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2017-11-12 15:35:37 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2017-11-12 15:35:37 +0100 |
commit | 6f5bdbfbddde1845072c24207937103b15fd2394 (patch) | |
tree | cf6f677a9660f8f0e7d1f1e6f8c69f081ab5edd9 /src | |
parent | deed13c71a23cc9d2279887bc7a77446cae0b454 (diff) |
Fixes extra line being added to generated maps.
Diffstat (limited to 'src')
-rw-r--r-- | src/shim_battlemap_battlemap.erl | 2 | ||||
-rw-r--r-- | src/shim_database.erl | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/shim_battlemap_battlemap.erl b/src/shim_battlemap_battlemap.erl index 6818bd9..a6adc83 100644 --- a/src/shim_battlemap_battlemap.erl +++ b/src/shim_battlemap_battlemap.erl @@ -13,7 +13,7 @@ generate_tile (1) -> generate_tile (2) -> {2, 99}. -generate(_Prev, Result, 0, 0, _BaseWidth) -> +generate(_Prev, Result, _X, 0, _BaseWidth) -> Result; generate(Prev, Result, 0, Y, BaseWidth) -> generate(Prev, Result, BaseWidth, (Y - 1), BaseWidth); diff --git a/src/shim_database.erl b/src/shim_database.erl index 8e7c383..f1abd8b 100644 --- a/src/shim_database.erl +++ b/src/shim_database.erl @@ -2,9 +2,13 @@ -export([fetch/2]). fetch(battlemaps_db, Object_ID) -> - io:format("~nGenerating new Battlemap ~p... ~n", [Object_ID]), Width = (rand:uniform(54) + 10), Height = (rand:uniform(54) + 10), + io:format + ( + "~nGenerating new Battlemap ~p of size (~p, ~p)...~n", + [Object_ID, Width, Height] + ), {ok, { shim_battlemap_battlemap:generate(Width, Height), |