mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'src/block/simple.rs')
| -rw-r--r-- | src/block/simple.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/block/simple.rs b/src/block/simple.rs new file mode 100644 index 0000000..ebbcc92 --- /dev/null +++ b/src/block/simple.rs @@ -0,0 +1,28 @@ +use crate::block::BlockLogic; + +pub struct SimpleBlock +{ + size: u8, + symmetric: bool, +} + +impl SimpleBlock +{ + pub const fn new(size: u8, symmetric: bool) -> Self + { + Self{size, symmetric} + } +} + +impl BlockLogic for SimpleBlock +{ + fn get_size(&self) -> u8 + { + self.size + } + + fn is_symmetric(&self) -> bool + { + self.symmetric + } +} |