pub struct TileSet37(pub [u8; 37]);Expand description
Histogram for all 37 kinds of tiles (including reds).
Can be directly indexed with Tile.
Tuple Fields§
§0: [u8; 37]Implementations§
Source§impl TileSet37
impl TileSet37
Sourcepub const fn complete_set(num_reds: [u8; 3]) -> Self
pub const fn complete_set(num_reds: [u8; 3]) -> Self
The complete set of tiles in a game, given the number of red 5’s in play. Each red 5 replaces its corresponding normal 5; the total number of tiles remains 136 (34 x 4).
Sourcepub fn packed_34(&self) -> [u32; 4]
pub fn packed_34(&self) -> [u32; 4]
Same as super::TileSet34::packed_34, but collapsing red 5’s into normal 5’s.
Sourcepub fn iter_tiles(&self) -> impl Iterator<Item = Tile>
pub fn iter_tiles(&self) -> impl Iterator<Item = Tile>
Iterates through all tiles in this tile set, in encoding order (i.e. reds come after honors).
Trait Implementations§
Source§impl From<TileSet37> for TileMask34
impl From<TileSet37> for TileMask34
Source§impl FromIterator<Tile> for TileSet37
impl FromIterator<Tile> for TileSet37
Source§impl IntoIterator for TileSet37
impl IntoIterator for TileSet37
impl Eq for TileSet37
impl StructuralPartialEq for TileSet37
Auto Trait Implementations§
impl Freeze for TileSet37
impl RefUnwindSafe for TileSet37
impl Send for TileSet37
impl Sync for TileSet37
impl Unpin for TileSet37
impl UnwindSafe for TileSet37
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more