Struct riichi_tools_rs::riichi::shapes::Shape [−][src]
pub struct Shape { /* fields omitted */ }
A hand consists of shapes. A tenpai hand has (usually) only 1 incomplete shape. Exceptions are for example 23456 wait, where you can either have 234 (complete) & 56 (incomplete), or 23 (incomplete) and 456 (complete) Or, shanpon wait (1155 = 11 pair 55 incomplete, or 11 incomplete 55 pair) Or, 13-sided kokushi, or 9-sided nine gates
Implementations
impl Shape
[src]
impl Shape
[src]pub fn new(shape_type: ShapeType, tile_count: u8, is_open: bool) -> Shape
[src]
pub fn get_shape_type(&self) -> &ShapeType
[src]
pub fn is_open(&self) -> bool
[src]
pub fn from_tiles(
tiles: &[Tile],
is_open: bool,
only_complete: bool
) -> Result<Shape, RiichiError>
[src]
tiles: &[Tile],
is_open: bool,
only_complete: bool
) -> Result<Shape, RiichiError>
Creates a shape from the given tiles. TODO incomplete shapes
pub fn are_in_shape(first_tile_id: u8, second_tile_id: u8) -> bool
[src]
Are these two tiles in a shape together?
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Shape
impl RefUnwindSafe for Shape
impl UnwindSafe for Shape
impl UnwindSafe for Shape