Crate board_game_geom [] [src]

Geometric types for 2D lattice-shaped puzzles.

Structs

CellId

An ID identifying a cell in lattice rectangle.

Move

A difference between two Points.

Point

A two-dimensional lattice point.

Points

An iterator iterating all points in the rectangle.

PointsInColumn

An iterator iterating all points in a column of the rectangle.

PointsInRow

An iterator iterating all points in a row of the rectangle.

Rotation

A 2x2 rotation matrix.

Size

A size of a rectangle.

Table

A table that stores values for each cells.

Constants

CELL_ID_OUTSIDE

An ID being given to cells on outside the rectangle.

MOVE_ALL_ADJACENTS

Move vectors that is toward eight adjacent points.

MOVE_ALL_DIRECTIONS

Move vectors that is toward four adjacent points.

MOVE_DOWN

A downward Move vector.

MOVE_LEFT

A leftward Move vector.

MOVE_RIGHT

A rightward Move vector.

MOVE_UP

An upward Move vector.

ROT_CCW0

A 0-degree Rotation to the left (counterclockwise).

ROT_CCW90

A 90-degree Rotation to the left (counterclockwise).

ROT_CCW180

A 180-degree Rotation to the left (counterclockwise).

ROT_CCW270

A 270-degree Rotation to the left (counterclockwise).

ROT_H_FLIP

Flip horizontal.

ROT_V_FLIP

Flip vertical.

Traits

Geom

A rectangle area.