#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub struct Connections {
pub up: bool,
pub down: bool,
pub left: bool,
pub right: bool,
}
impl Connections {
pub fn none() -> Self {
Self::default()
}
pub fn merge(&mut self, other: Connections) {
self.up |= other.up;
self.down |= other.down;
self.left |= other.left;
self.right |= other.right;
}
#[allow(dead_code)]
pub fn count(&self) -> u8 {
self.up as u8 + self.down as u8 + self.left as u8 + self.right as u8
}
}