pleco-rs / Pleco

A Rust-based re-write of the Stockfish Chess Engine

Home Page:https://crates.io/crates/pleco

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simplifying PieceLocations

sfleischman105 opened this issue · comments

Piece Locations is now a structure of [u8; 32], with each square (consisting of a Piece and a Color) represented as 4 bits.

This makes it very compact, but may provide unnecessary overhead due to needing to mask and shift values. A possible solution is accept wasted space, and use an array of [u8; 64] to represent each square