chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac63143
)
hidden: Provide PieceOccult::is_active
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 14 Mar 2021 22:09:47 +0000
(22:09 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 14 Mar 2021 22:09:47 +0000
(22:09 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/hidden.rs
patch
|
blob
|
history
diff --git
a/src/hidden.rs
b/src/hidden.rs
index 84bef6f2cdea8f058d65e8a72da5872b7b4d9c85..2a9cbbf79c87a4612d1d8fe97e65d6d5c5f01b7c 100644
(file)
--- a/
src/hidden.rs
+++ b/
src/hidden.rs
@@
-63,6
+63,10
@@
pub enum OccultationKindGeneral<D> {
}
pub type OccultationKind = OccultationKindGeneral<(Area, ZCoord)>;
+impl PieceOccult {
+ pub fn is_active(&self) -> bool { self.active.is_some() }
+}
+
impl Default for OccultationKind {
fn default() -> Self { OccK::Visible }
}