aboutsummaryrefslogtreecommitdiff
path: root/benches/perft.rs
blob: c73208fcc290258174642ca8553937cb5324c6ce (plain)
1
2
3
4
5
6
7
8
9
10
11
use std::time::Instant;
use chessnost::board::Board;

fn main() {
    let fen = String::from("r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - ");
    let mut board = Board::from_FEN(fen);

    let start = Instant::now();
    let result = board.perft(5, false);
    println!("Perft finished in {:?}: {:?}", start.elapsed(), result);
}