summaryrefslogtreecommitdiffhomepage
path: root/src/chunk.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-17 10:24:37 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-17 10:24:37 +0200
commit3b2e2ed05b593f2fdd8ec7153bddb6cd8dd1e246 (patch)
tree9ed08a91d0462154ff39ad759c648fb640fac07a /src/chunk.cpp
parent8bf700d1b2a5cbb7cfd99ca8a0492b2a5bfd2f3a (diff)
a
Diffstat (limited to 'src/chunk.cpp')
-rw-r--r--src/chunk.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp
index 4537acec..95904d81 100644
--- a/src/chunk.cpp
+++ b/src/chunk.cpp
@@ -2,4 +2,13 @@
namespace floormat {
+bool chunk::empty() const
+{
+ for (const tile& x : _tiles)
+ if (x.ground_image || x.wall_north || x.wall_west)
+ return false;
+
+ return true;
+}
+
} // namespace floormat