Crate reason_othello[][src]

reason-othello is a fast, full-featured Othello library for engines and UIs.

This package implements three levels of abstraction:

  • bitboard contains the raw, unchecked operations for working with Othello boards. These are fast, but may result in inconsistent state if their contracts are not manually checked. Bitboard operations are also provided through a C FFI.
  • Board implements the core game logic in the same fast, unchecked way as bitboard. This is suitable for use with engines.
  • Game is a high-level, safe interface to all of the Othello game logic. It is slower but safer and more complete than Board.

Modules

bitboard

Low-level bitboard operations.

ffi

A C-compatible FFI for core bitboard functions.

test_utils

Utilities used for testing and benchmarking.

Structs

Board

The complete state of an Othello game, seen from one player’s perspective.

Game

A safe interface to game logic. Slower than Board, but implements a safer, checked interface.

InvalidMoveError
Location

A location on the Othello board.

LocationList

A list of locations on the Othello board, which can be iterated to retrieve them.

ParseBoardError
ParseLocationError
ParseMoveError
ParsePlayerError

Enums

Move

An Othello move.

ParseGameError
Player

One of the two players in a game.

Constants

EDGE_LENGTH

The number of spaces on one edge of an Othello board.

NUM_SPACES

The number of spaces on an Othello board.