Fix up the spatialmap to have an occupied_by method which checks if a square is occupied and returns what is there.

This commit is contained in:
Zed A. Shaw 2025-09-02 12:46:05 -04:00
parent 759f93cae0
commit a11e7de14e
7 changed files with 24 additions and 43 deletions

View file

@ -35,6 +35,7 @@ class SpatialMap {
void move(Point from, Point to, DinkyECS::Entity ent);
// return value is whether the removed thing has collision
CollisionData remove(Point pos, DinkyECS::Entity entity);
DinkyECS::Entity occupied_by(Point pos) const;
bool occupied(Point pos) const;
bool something_there(Point at) const;
DinkyECS::Entity get(Point at) const;