[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:
parent
d3ab477795
commit
bea6dd67c8
9 changed files with 25 additions and 28 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue