myopic-core 1.3.0

Core chess utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::bitboard::BitBoard;
use crate::square::Square;

use super::bishops;
use super::rooks;

pub fn control(loc: Square, whites: BitBoard, blacks: BitBoard) -> BitBoard {
    bishops::control(loc, whites, blacks) | rooks::control(loc, whites, blacks)
}

pub fn white_moves(loc: Square, whites: BitBoard, blacks: BitBoard) -> BitBoard {
    bishops::white_moves(loc, whites, blacks) | rooks::white_moves(loc, whites, blacks)
}

pub fn black_moves(loc: Square, whites: BitBoard, blacks: BitBoard) -> BitBoard {
    bishops::black_moves(loc, whites, blacks) | rooks::black_moves(loc, whites, blacks)
}