shuffle
This commit is contained in:
parent
78029687d7
commit
bea146d439
9 changed files with 88 additions and 41 deletions
28
src/tiles.rs
28
src/tiles.rs
|
|
@ -1,24 +1,22 @@
|
|||
use bevy::{ecs::entity::MapEntities, prelude::*};
|
||||
use strum::FromRepr;
|
||||
|
||||
|
||||
// #[derive(Component)]
|
||||
// #[derive(relasionship(re))]
|
||||
// pub struct TileEntity {
|
||||
// #[relationship]
|
||||
// pub parent: Entity,
|
||||
|
||||
// r#type: Tile,
|
||||
// }
|
||||
|
||||
struct Hand;
|
||||
use crate::game::wall::Wall;
|
||||
|
||||
#[derive(Component)]
|
||||
#[relationship(relationship_target = Wall)]
|
||||
pub struct InWall(pub Entity);
|
||||
|
||||
// #[derive(Component)]
|
||||
// #[relationship(relationship_target = WallTiles)]
|
||||
// pub(crate) struct InHand(pub Entity);
|
||||
|
||||
#[derive(Component, Debug)]
|
||||
pub struct Tile {
|
||||
suit: Suit,
|
||||
}
|
||||
|
||||
#[derive(MapEntities)]
|
||||
#[derive(MapEntities, Debug)]
|
||||
pub enum Suit {
|
||||
Pin(Rank),
|
||||
Sou(Rank),
|
||||
|
|
@ -27,10 +25,10 @@ pub enum Suit {
|
|||
Dragon(Dragon),
|
||||
}
|
||||
|
||||
#[derive(Deref, DerefMut)]
|
||||
#[derive(Deref, DerefMut, Debug)]
|
||||
pub struct Rank(u8);
|
||||
|
||||
#[derive(FromRepr)]
|
||||
#[derive(FromRepr, Debug)]
|
||||
pub enum Wind {
|
||||
Ton,
|
||||
Nan,
|
||||
|
|
@ -38,7 +36,7 @@ pub enum Wind {
|
|||
Pei,
|
||||
}
|
||||
|
||||
#[derive(FromRepr)]
|
||||
#[derive(Debug, FromRepr)]
|
||||
pub enum Dragon {
|
||||
Haku,
|
||||
Hatsu,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue