Initial card => tilemap
This commit is contained in:
37
src/card.rs
37
src/card.rs
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user