diff --git a/src/card.rs b/src/card.rs index 6c9cecf..5409c64 100644 --- a/src/card.rs +++ b/src/card.rs @@ -97,6 +97,9 @@ impl Card { } } + // TODO: The other shapes + pub const OCTAGON: Self = Self::new(OCTAGON); + /// Produces a new card by stacking another on top of this one. pub fn merge(self, top: Self) -> (Self, Option) { let mut new_card = Self::default(); diff --git a/src/game/map.rs b/src/game/map.rs index 26b9a14..44cea41 100644 --- a/src/game/map.rs +++ b/src/game/map.rs @@ -11,20 +11,7 @@ pub fn setup_test_tilemap(mut commands: Commands, assets: Res) { let map_size = TilemapSize { x: 9, y: 9 }; let mut tile_storage = TileStorage::empty(map_size); - let card = Card { - cells: [ - Cell::NW, - Cell::Filled, - Cell::NE, - Cell::Filled, - Cell::Filled, - Cell::Filled, - Cell::SW, - Cell::Filled, - Cell::SE, - ], - ..Default::default() - }; + let card = Card::OCTAGON; add_card_to_tilemap( &card,