niklasf / shakmaty

A Rust library for chess and chess variant rules and operations
https://docs.rs/shakmaty
GNU General Public License v3.0
210 stars 41 forks source link

Add geometric transformation methods to `Board`. #50

Closed kraktus closed 2 years ago

kraktus commented 2 years ago

Same as those implemented for Bitboard.

Previously it was hard to do so efficiently, as far as I could tell.

Chosen to mutate the current board because it seems most consistent path compared to other methods, but no strong preference if you think returning a new Board is better.

niklasf commented 2 years ago

Thanks. I agree that mutating is probably best, here.