-
-
Notifications
You must be signed in to change notification settings - Fork 0
hero: refactor movement code for efficiency #89
Copy link
Copy link
Open
Description
The current movement code consists of several code paths, which are very similar and only differ in that the checks are done for a few variables, and they act on only a couple of them.
They can probably be refactored in some generic code which can be used to do checks from a table and act on the coordinates according to that table.
This would make easy also to enable explicit 8-direction movement (i.e. diagonal and straight) and reduce the amount of code.
Also, this would make conditional compile for either 4- or 8-direction movement trivial (i.e. a table with just 4 or 8 checks)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request