Chess-Web / neural_engine /src /bin /test_material.rs
dpv007's picture
Upload folder using huggingface_hub
e2c1cfa verified
Raw
History Blame Contribute Delete
308 Bytes
use shakmaty::{Chess, Position};
fn main() {
let pos = Chess::default();
let board = pos.board();
let white = board.by_color(shakmaty::Color::White);
let pawns = board.by_role(shakmaty::Role::Pawn);
let w_pawns = (white & pawns).count();
println!("White Pawns: {}", w_pawns);
}