Crate gomoku_core [] [src]

Reexports

pub use board::Board;
pub use board::PlaceInfo;
pub use board::PlaceError;
pub use board::PlaceResult;

Modules

board

Structs

Alignment
Axes

Represent all the 4 axes (horizontal, diagonal_up, vertical, diagonal_down)

Directions

Represent all the 8 possible directions to construct a Direction type you need to create it from a [T; 8] (top, top_right, right, bot_right, bot, bot_left, left, top_left)

Enums

BoundState
Color

Constants

BOT
BOT_LEFT
BOT_RIGHT
DIAGONAL_DOWN
DIAGONAL_UP
GRID_LEN

Width and Height of the Gomoku board

HORIZONTAL
LEFT
RIGHT
TOP
TOP_LEFT
TOP_RIGHT
VERTICAL

Functions

get_alignments

Returns alignments for the color at pos

get_captures

Get all possible captures for the color at pos

get_free_threes

Returns the free-threes for the color at pos

Type Definitions

Grid

The type used to represent the Gomoku grid

Position
Tile

Unit value of the Grid, indicate state of each Grid tile