Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions game/dojo/src/models.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ pub struct Moves {
pub can_move: bool,
}

#[derive(Copy, Drop, Serde, Debug)]
#[dojo::model]
pub struct Coordinates {
#[key]
pub pieceID: u8,
pub x: u8,
pub y: u8
}

#[derive(Drop, Serde, Debug)]
#[dojo::model]
pub struct DirectionsAvailable {
Expand All @@ -38,6 +47,7 @@ pub struct DirectionsAvailable {
pub down: bool,
pub both: bool,
}

#[derive(Copy, Drop, Serde, Debug)]
#[dojo::model]
pub struct Position {
Expand All @@ -46,7 +56,6 @@ pub struct Position {
pub vec: Vec2,
}


#[derive(Serde, Copy, Drop, Introspect, PartialEq, Debug)]
pub enum Direction {
Left,
Expand All @@ -55,7 +64,6 @@ pub enum Direction {
Down,
}


#[derive(Copy, Drop, Serde, IntrospectPacked, Debug)]
pub struct Vec2 {
pub x: u32,
Expand Down
Loading