Closed neocastro closed 4 years ago
Mons.Map functions no longer use z as an index to access elements in a tile
Mons.Map
z
Mons.Game.map_push was both deleting from a tile and pushing onto another, I removed the deleting logic and added Mons.Game.map_del
Mons.Game.map_push
Mons.Game.map_del
Mons.map_source is now takes a List(List(String)) and this change has been reflected in Mons.Map.build
Mons.map_source
List(List(String))
Mons.Map.build
Also added some Mons.Kind.get_ helpers which made things cleaner in multiple places
Mons.Kind.get_
Removed the if ... then ... else repeated pattern in Mons.Map.code_to_tile in favor of a cleaner version using the Pair syntax-sugar
if ... then ... else
Mons.Map.code_to_tile
Pair
In order to test the change in the Z , I've temporarily added two new commands: O to go up and P to go down
Z
O
P
Mons.Map
functions no longer usez
as an index to access elements in a tileMons.Game.map_push
was both deleting from a tile and pushing onto another, I removed the deleting logic and addedMons.Game.map_del
Mons.map_source
is now takes aList(List(String))
and this change has been reflected inMons.Map.build
Also added some
Mons.Kind.get_
helpers which made things cleaner in multiple placesRemoved the
if ... then ... else
repeated pattern inMons.Map.code_to_tile
in favor of a cleaner version using thePair
syntax-sugarIn order to test the change in the
Z
, I've temporarily added two new commands:O
to go up andP
to go down