aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-08-03 18:00:52 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2018-08-03 18:00:52 +0200
commit0dd600defd67221fce342315bddb873cf5686eea (patch)
tree6ed2a88db2e101e9a907412c793139a2cc66ad7e
parentc012ed837e05bbdf69ca0dc418d86291687298af (diff)
downloadtacticians-server-0dd600defd67221fce342315bddb873cf5686eea.zip
tacticians-server-0dd600defd67221fce342315bddb873cf5686eea.tar.bz2
Got it to work and look okay. Only for map-editor.map-handler
-rw-r--r--src/map/map_shim.erl67
-rw-r--r--src/map/struct/map_map.erl2
-rw-r--r--src/map/struct/map_tile.erl.m463
3 files changed, 67 insertions, 65 deletions
diff --git a/src/map/map_shim.erl b/src/map/map_shim.erl
index dc673be..de87bc2 100644
--- a/src/map/map_shim.erl
+++ b/src/map/map_shim.erl
@@ -12,42 +12,41 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec demo_map ()
- -> list({non_neg_integer(), non_neg_integer(), non_neg_integer()}).
+-spec demo_map () -> list(list(non_neg_integer())).
demo_map () ->
[
- {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {2, 2, 0}, {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0}, {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0},
- {2, 2, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {2, 2, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {2, 2, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {2, 2, 0},
- {2, 2, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {1, 1, 0}, {1, 1, 0}, {3, 3, 0}, {1, 1, 0}, {3, 3, 0}, {3, 3, 0}, {3, 3, 0}, {2, 2, 0},
- {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
- {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}
+ [2, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [2, 0],
+ [2, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [2, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [2, 0],
+ [2, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [2, 0],
+ [2, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [2, 0],
+ [2, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [2, 0],
+ [2, 0], [1, 0], [1, 0], [1, 0], [3, 0], [2, 0], [2, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [3, 0], [2, 0], [1, 0], [3, 0], [1, 0], [2, 0],
+ [2, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, 0], [3, 0], [3, 0], [1, 0], [3, 0], [2, 0],
+ [2, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [3, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [2, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [2, 0],
+ [2, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [1, 0], [2, 0],
+ [2, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [2, 0],
+ [2, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [3, 0], [3, 0], [1, 0], [3, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, 0],
+ [2, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [2, 0],
+ [2, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [3, 0], [3, 0], [1, 0], [3, 0], [1, 0], [2, 0],
+ [2, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [2, 0],
+ [2, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [2, 0],
+ [2, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [2, 0],
+ [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0], [2, 0],
+ [2, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [2, 0],
+ [2, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [2, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [2, 0],
+ [2, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, 0],
+ [2, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [2, 0], [2, 0], [1, 0], [1, 0], [1, 0], [3, 0], [2, 0],
+ [2, 0], [3, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [2, 0],
+ [2, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [3, 0], [1, 0], [2, 0],
+ [2, 0], [3, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [2, 0],
+ [2, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [3, 0], [1, 0], [2, 0],
+ [2, 0], [3, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [2, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [3, 0], [2, 0],
+ [2, 0], [3, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [3, 0], [3, 0], [1, 0], [2, 0], [1, 0], [2, 0],
+ [2, 0], [3, 0], [3, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [3, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [2, 0],
+ [2, 0], [3, 0], [3, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [1, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [2, 0],
+ [2, 0], [3, 0], [3, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [1, 0], [3, 0], [4, 0], [4, 0], [4, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [1, 0], [1, 0], [3, 0], [1, 0], [3, 0], [3, 0], [3, 0], [2, 0],
+ [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0],
+ [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0], [4, 0]
].
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/src/map/struct/map_map.erl b/src/map/struct/map_map.erl
index db7ea3e..3c25034 100644
--- a/src/map/struct/map_map.erl
+++ b/src/map/struct/map_map.erl
@@ -91,7 +91,7 @@ get_tile_instance (Location, Map) ->
binary(),
non_neg_integer(),
non_neg_integer(),
- list({non_neg_integer(), non_neg_integer(), non_neg_integer()})
+ list(list(non_neg_integer()))
)
-> type().
from_list (ID, Owner, Width, Height, List) ->
diff --git a/src/map/struct/map_tile.erl.m4 b/src/map/struct/map_tile.erl.m4
index 78f87fc..5939736 100644
--- a/src/map/struct/map_tile.erl.m4
+++ b/src/map/struct/map_tile.erl.m4
@@ -16,14 +16,12 @@
).
-opaque class_id() :: non_neg_integer().
--opaque instance() :: (
- {class_id(), class_id(), non_neg_integer()}
- | non_neg_integer()
-).
+-opaque instance() :: list(non_neg_integer()).
+-opaque border() :: list(non_neg_integer()).
-opaque type() :: #tile{}.
--export_type([type/0, class_id/0, instance/0]).
+-export_type([type/0, class_id/0, instance/0, border/0]).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -50,8 +48,16 @@
(
[
extract_main_class_id/1,
- extract_border_class_id/1,
- extract_variant_ix/1
+ extract_variant_ix/1,
+ extract_borders/1
+ ]
+).
+
+-export
+(
+ [
+ extract_border_main_class_id/1,
+ extract_border_variant_ix/1
]
).
@@ -64,22 +70,21 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec extract_main_class_id (instance()) -> class_id().
-extract_main_class_id (M) when is_integer(M) ->
- M;
-extract_main_class_id ({M, _, _}) ->
- M.
+extract_main_class_id (I) -> lists:nth(1, I).
--spec extract_border_class_id (instance()) -> class_id().
-extract_border_class_id (M) when is_integer(M) ->
- M;
-extract_border_class_id ({_, B, _}) ->
- B.
+-spec extract_borders (instance()) -> list(border()).
+extract_borders (I) ->
+ [_|[_|Result]] = I,
+ Result.
-spec extract_variant_ix (instance()) -> non_neg_integer().
-extract_variant_ix (M) when is_integer(M) ->
- 0;
-extract_variant_ix ({_, _, V}) ->
- V.
+extract_variant_ix (I) -> lists:nth(2, I).
+
+-spec extract_border_main_class_id (border()) -> class_id().
+extract_border_main_class_id (B) -> lists:nth(1, B).
+
+-spec extract_border_variant_ix (border()) -> non_neg_integer().
+extract_border_variant_ix (B) -> lists:nth(2, B).
-spec from_class_id (class_id()) -> type().
m4_include(__MAKEFILE_DATA_DIR/tile/global.m4.conf)m4_dnl
@@ -103,16 +108,14 @@ get_cost (Tile) -> Tile#tile.cost.
-spec get_name (type()) -> binary().
get_name (Tile) -> Tile#tile.name.
--spec instance_from_ints
- (
- {non_neg_integer(), non_neg_integer(), non_neg_integer()}
- ) -> instance().
-instance_from_ints ({M, B, V}) ->
- case (M == B) of
- true -> M;
- _ -> {M, B, V}
+-spec instance_from_ints (list(non_neg_integer())) -> instance().
+instance_from_ints (L) ->
+ LLength = length(L),
+
+ case (((LLength rem 2) == 0) and (LLength /= 0)) of
+ true -> L;
+ _ -> [0, 0]
end.
-spec instance_to_int_list (instance()) -> list(non_neg_integer()).
-instance_to_int_list (M) when is_integer(M) -> [M];
-instance_to_int_list ({M, B, V}) -> [M, B, V].
+instance_to_int_list (I) -> I.