Closed MLanghof closed 7 years ago
By the way, if the TILE
class name is not acceptable, let me know. I feel like it fits right in when used though (and naming it Tile
would leave unfamiliar people very confused as to why tiles are not instances of Tile
).
First of all, removed the tile logic (
isSolid()
etc.) fromCell
. Either doubling all the functions intoWorld
or forcing other classes to go through (or even know about)Cell
is awful.Tile values can now be checked through a set of functions that is both easily extensible and encompassing, while also being brief and intuitive to use.
Overall, this change should help encapsulation a lot. For example, it was trivial to make the laser end when it exits the world, which was previously infuriatingly difficult.