diff options
Diffstat (limited to 'src/views.h')
-rw-r--r-- | src/views.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/views.h b/src/views.h index 69bd2b5..540dc52 100644 --- a/src/views.h +++ b/src/views.h | |||
@@ -55,6 +55,20 @@ namespace views { | |||
55 | }); | 55 | }); |
56 | } | 56 | } |
57 | 57 | ||
58 | inline auto atGridPos(vec2s pos) | ||
59 | { | ||
60 | return ranges::view::filter([pos] (const Entity& entity) { | ||
61 | return entity.gridPos == pos; | ||
62 | }); | ||
63 | } | ||
64 | |||
65 | inline auto isMovingTo(vec2s pos) | ||
66 | { | ||
67 | return ranges::view::filter([pos] (const Entity& entity) { | ||
68 | return entity.moving && entity.destPos == pos; | ||
69 | }); | ||
70 | } | ||
71 | |||
58 | 72 | ||
59 | 73 | ||
60 | } | 74 | } |