[board] Remove the position reference from move generator structs

Simplifies the lifetime calculations, and makes it possible to cache a Moves
object on Position.
This commit is contained in:
Eryn Wells 2024-01-27 13:02:43 -08:00
parent d3ab477795
commit bea6dd67c8
9 changed files with 25 additions and 28 deletions

View file

@ -7,7 +7,7 @@ use chessfriend_core::{Color, Direction, Piece, PlacedPiece};
move_generator_declaration!(ClassicalMoveGenerator);
impl<'pos> MoveGeneratorInternal for ClassicalMoveGenerator<'pos> {
impl MoveGeneratorInternal for ClassicalMoveGenerator {
fn piece(color: Color) -> Piece {
Piece::queen(color)
}
@ -66,7 +66,7 @@ mod tests {
use super::*;
use crate::{position, position::DiagramFormatter};
use chessfriend_bitboard::{bitboard, BitBoard};
use chessfriend_core::{piece, Color};
use chessfriend_core::Color;
#[test]
fn classical_single_queen_bitboard() {