[][src]Type Definition shakmaty::MoveList

type MoveList = ArrayVec<[Move; 512]>;

A container for moves that can be stored inline on the stack.

The capacity is limited, but there is enough space to hold the legal moves of any chess position, including any of the supported chess variants.

Example

use shakmaty::{Chess, Position, MoveList};

let pos = Chess::default();
let mut legals = MoveList::new();
pos.legal_moves(&mut legals);
assert_eq!(legals.len(), 20);