Crate rotchess_core

Source
Expand description

Core library code for headless rotchess logic.

This module provides functionality for a RotchessEmulator to modify and record state over time as it is fed information in the form of events. External code should read the board’s state and draw it for the user. This crate is not responsible for any drawing of state. It does, however, provide functions that help the drawing program understand what to draw.

§Important definitions

Ok well, coords and angles are almost definitely all outdated and wrong now, haha.

  • coordinate system: all coordinates are standard euclidean coordinates. That is, x and y increase going right and up. This may differ from code that draws the rotchess pieces, where the coordinate system may increase y when going down.
  • angles: follows standard math convention. Unless otherwise specified, they’re measured in radians, 0 at the positive x-axis, increasing anticlockwise.
  • rotchess-unit: an eighth of the side length of the board.

Re-exports§

pub use emulator::RotchessEmulator;

Modules§

emulator
The main entrypoint for any rotchess user.
floating_drift
piece
turn

Macros§

floating_drift_adjust
If the floats are essentially integers, make them the exact integers.