____
| |
|tile|
| 2 |
|____| two labelled tiles
| |
|tile|
| 1 |
|____|
____
| |
| | X is a mob
| |
|____|
|XXXX|
|XXXX| mob is in tile 1
|XXXX|
|XXXX|
____
| |
| |
| |
|XXXX| still in tile 1
|XXXX|
|XXXX|
|XXXX|
|____|
____
| |
| |
|XXXX|
|XXXX| mob is halfway between tiles 1 and 2
|XXXX| but which one is he in?
|XXXX|
| |
|____|
So the problem is the halfway space between tiles. Which loc should the mob be in? Is there a quick and easy way to handle this problem, or do I have to write out lines upon lines of gritty code?
(This isn't for the 4K challenge, so I don't need evil, brace-using code.)
Actually, that paragraph meant absolutely nothing.
Really, it doesn't matter. Just move the mob into the next tile when it reaches half-way.