[explorer, moves, position] Remove unused MoveBuilder

This thing isn't used by any of the "modern" code I've written. It was difficult
to write, but kinda neat architecturally. It made a lot of invalid configurations
of moves into build-time errors. Anyway…

Remove several of the tests that relied on it, but that hadn't been updated to
use the newer code either.
This commit is contained in:
Eryn Wells 2025-06-08 17:16:23 -07:00
parent 035a83723d
commit 651544fdd9
7 changed files with 4 additions and 589 deletions

View file

@ -6,7 +6,7 @@ use chessfriend_board::ZobristState;
use chessfriend_board::{fen::FromFenStr, Board};
use chessfriend_core::random::RandomNumberGenerator;
use chessfriend_core::{Color, Piece, Shape, Square};
use chessfriend_moves::{Builder as MoveBuilder, GeneratedMove, ValidateMove};
use chessfriend_moves::GeneratedMove;
use chessfriend_position::{fen::ToFenStr, PlacePieceStrategy, Position};
use clap::{Arg, Command};
use rustyline::error::ReadlineError;
@ -128,22 +128,8 @@ fn respond(line: &str, state: &mut State) -> anyhow::Result<CommandResult> {
println!("{}", state.position.to_fen_str()?);
result.should_print_position = false;
}
Some(("make", matches)) => {
let from_square = Square::from_algebraic_str(
matches
.get_one::<String>("from")
.ok_or(CommandHandlingError::MissingArgument("from"))?,
)?;
let to_square = Square::from_algebraic_str(
matches
.get_one::<String>("to")
.ok_or(CommandHandlingError::MissingArgument("to"))?,
)?;
let ply = MoveBuilder::new().from(from_square).to(to_square).build()?;
state.position.make_move(ply, ValidateMove::Yes)?;
Some(("make", _matches)) => {
unimplemented!()
}
Some(("place", matches)) => {
let color = matches