crow/board/path

Types

pub type Blocked {
  FriendlyPiece
  RivalPiece
  OutOfBounds
  StepLimit
  Capture
}

Constructors

  • FriendlyPiece
  • RivalPiece
  • OutOfBounds
  • StepLimit
  • Capture
pub type Path {
  Path(positions: List(Coordinate), capture: Option(Coordinate))
}

Constructors

  • Path(positions: List(Coordinate), capture: Option(Coordinate))
pub type Trace {
  Trace(
    position: Coordinate,
    direction: Coordinate,
    step: Int,
    path: List(Coordinate),
  )
}

Constructors

  • Trace(
      position: Coordinate,
      direction: Coordinate,
      step: Int,
      path: List(Coordinate),
    )

Functions

pub fn build(trace: Trace, rule: Rule(Trace, Blocked)) -> Path
pub fn new(from: Coordinate, trajectory: Coordinate, rule: Rule(
    Trace,
    Blocked,
  )) -> Path
Search Document