Initial card => tilemap

This commit is contained in:
Patrick Gelvin
2025-08-27 07:47:11 -07:00
parent c81d17ce31
commit 37cb394bf5
9 changed files with 464 additions and 61 deletions

View File

@@ -14,6 +14,25 @@ pub enum Cell {
Filled,
}
#[derive(Clone, Copy, Debug)]
pub struct Walls {
pub north: bool,
pub east: bool,
pub south: bool,
pub west: bool,
}
impl Walls {
pub fn new(north: bool, east: bool, south: bool, west: bool) -> Self {
Self {
north,
east,
south,
west,
}
}
}
#[derive(Clone, Copy, Debug)]
pub enum CutLine {
VertLeft,
@@ -51,15 +70,15 @@ pub enum RotationDir {
/// *or may not* be valid, yet.
#[derive(Clone, Copy, Component, Debug, Default, PartialEq)]
pub struct Card {
cells: [Cell; 9],
nw: bool,
n: bool,
ne: bool,
w: bool,
e: bool,
sw: bool,
s: bool,
se: bool,
pub cells: [Cell; 9],
pub nw: bool,
pub n: bool,
pub ne: bool,
pub w: bool,
pub e: bool,
pub sw: bool,
pub s: bool,
pub se: bool,
}
impl Card {