Commit graph

16 commits

Author SHA1 Message Date
9010f1e9c2 [explorer, moves, core] Improve error handling in explorer
Implement thiserror::Error for a bunch of error types, and remove string errors
from the implementation of the command handler in explorer.

Clean up parsing of basic types all over the place.

Update Cargo files to include thiserror and anyhow.
2025-05-19 14:18:31 -07:00
72eeba84ba [explorer] Specify the chessfriend_board dependency 2025-05-19 08:42:53 -07:00
39ca74459d [explorer] Implement a reset command
Resets the board to an empty or starting state, or to a position specified by a FEN string.
2025-05-19 08:42:34 -07:00
d67c2cfb99 [explorer] A bunch of random changes to this binary
Too many changes mixed up together to tease apart.
2025-05-19 08:41:48 -07:00
00c4aa38f0 [explorer] make command no longer requires specifying a piece 2025-05-19 08:38:52 -07:00
539b1fca6e [expolorer] Add two new commands for showing available moves and sight of a piece on a square 2025-05-19 08:28:23 -07:00
f1cd36952b Fix build errors in explorer 2024-02-25 09:52:49 -08:00
ed55eda901 Update the Cargo.toml files 2024-01-28 09:58:50 -08:00
569693bda9 Merge branch 'main' into rename-board-crate
# Conflicts:
#	explorer/src/main.rs
2024-01-28 09:55:53 -08:00
8eb180df67 [explorer] Add fen and make commands
Clean up the implementation of the place command.

Track state with a State struct that contains a position and a builder. The place
command will place a new piece and then regenerate the position.

The make command makes a move. The syntax is:

    make [color:w|b] [shape] [from square] [to square]

The fen command prints a FEN string representing the position.
2024-01-28 09:50:39 -08:00
66d03d3514 [board] Clean up a bunch of imports 2024-01-28 09:46:38 -08:00
76ac719418 [position] Rename the board crate → chessfriend_position in Cargo.toml
Rename the crate, but don't move any files.
2024-01-28 09:40:45 -08:00
a73355c769 [explorer] Track result of command with a CommandResult type, and overall state with a State type 2024-01-24 17:16:33 -08:00
d901be53d2 [explorer] Depends on core 2024-01-24 09:15:18 -08:00
7071f6a742 [board] Cave to pressure and implement fmt::Display for Position
It prints a nice diagram!

Now I can make the position module private.
2024-01-19 18:12:28 -08:00
f340578cf2 [explorer] A REPL-style command line app to fiddle with chess boards
Build a REPL that enables placing pieces on a chess board. Nothing else so far!
2023-12-28 15:09:15 -07:00