Trait board_game_geom::Geom [] [src]

pub trait Geom {
    fn size(&self) -> Size;

    fn row(&self) -> i32 { ... }
    fn column(&self) -> i32 { ... }
    fn cell_len(&self) -> usize { ... }
    fn contains(&self, p: Point) -> bool { ... }
    fn point_to_cellid(&self, p: Point) -> CellId { ... }
    fn cellid_to_point(&self, id: CellId) -> Point { ... }
    fn points(&self) -> Points { ... }
    fn points_in_row(&self, row: i32) -> PointsInRow { ... }
    fn points_in_column(&self, column: i32) -> PointsInColumn { ... }
}

A rectangle area.

Required Methods

Returns the rectangle's size.

Provided Methods

Returns the number of the rectangle's rows.

Returns the number of the rectangle's columns.

Returns the cell length which is contained in the rectangle.

Returns true if the point is contained in the rectangle.

Convert a point to a corresponding cell ID.

Convert a cell ID to a corresponding point.

Returns an iterator iterating all points.

Returns an iterator iterating all points in the row.

Returns an iterator iterating all points in the column.

Implementors