riichi_elements/
tile_set.rs

1//! Unordered multi- and single-sets of tiles (histograms).
2//!
3//! These can be used to represent any unordered set of tiles, such as a closed hand, a full winning
4//! hand, all waiting tiles of a waiting hand, and tiles discarded by a player.
5//!
6//! - [`TileSet37`]: multi-set; treats "red 5" tiles separately from "normal 5" (34 + 3 = 37 kinds)
7//! - [`TileSet34`]: multi-set; treats "red 5" tiles the same as "normal 5" (34 kinds)
8//! - [`TileMask34`]: single-set counting unique tiles;
9//!   treats "red 5" tiles the same as "normal 5" (34 kinds)
10//!
11//! As the names suggest, the specific encoding of [Tile] is assumed.
12//!
13//! Both [`TileSet37`] and [`TileSet34`] can be indexed with [`Tile`][Tile] (red or normal, 37 or
14//! 34), without first converting to encoding. A [`TileSet37`] can be converted to a [`TileSet34`]
15//! with red 5's folded into normal 5's. Any multi-set can be converted to a [`TileMask34`].
16//!
17//! [Tile]: crate::tile::Tile
18//!
19
20mod tile_set_37;
21mod tile_set_34;
22mod tile_mask_34;
23
24pub use self::{
25    tile_set_37::*,
26    tile_set_34::*,
27    tile_mask_34::*,
28};