Struct pleco::board::RandBoard[][src]

pub struct RandBoard { /* fields omitted */ }

Random Board generator. Creates either one or many random boards with optional parameters.

Examples

Create one Board with at least 5 moves played that is created in a pseudo-random fashion.

use pleco::board::{Board,RandBoard};

let rand_boards: Board = RandBoard::new()
    .pseudo_random(12455)
    .min_moves(5)
    .one();

Create a Vec of 10 random Boards that are guaranteed to not be in check.

use pleco::board::{Board,RandBoard};

let rand_boards: Vec<Board> = RandBoard::new()
    .pseudo_random(12455)
    .no_check()
    .many(10);

Methods

impl RandBoard
[src]

Create a new RandBoard object.

Important traits for Vec<u8>

Creates a Vec<Board> full of Boards containing random positions. The Vec will be of size 'size'.

Creates a singular Board with a random position.

Turns PseudoRandom generation on. This allows for the same random Boards to be created from the same seed.

Sets the minimum moves a randomly generated Board must contain.

Guarantees that the boards returned are only in check,

Guarantees that the boards returned are not in check.

Generates Random Boards from the start position only

Trait Implementations

impl Default for RandBoard
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for RandBoard

impl Sync for RandBoard