Commit graph

14 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
cd3efa61c9 [core] Fix the coordinate tests
Use symbols instead of magic numbers.
2025-05-19 08:35:35 -07:00
b229049e27 [board, core] Update error types to use thiserror::Error 2025-05-19 08:34:32 -07:00
091cc99cb3 WIP 2025-05-08 17:37:51 -07:00
ee51a13870 Rename Square::from_index → from_index_unchecked 2024-07-13 08:10:21 -07:00
534c022981 [core] Add #[must_use] to several methods in coordinates 2024-07-13 07:21:21 -07:00
a2d0c638d0 [core] Address clippy suggestions; clean up unit tests
In coordinates.rs:

- Add some [must_use] decorators to some getters
- Rewrite some unit tests to remove the .expect() and use ? instead
2024-04-25 08:05:07 -07:00
89802be53d [core] Address some clippy linter errors in core/coordinate.rs 2024-03-10 09:16:21 -07:00
82aa7a2b01 [core] Rewrite Direction as a coordinate_enum!
- Order the values of Direction in a clockwise fashion
- Implement Direction::opposite() to return the opposing direction
- Make some small changes to the macros in this file to improve readability, maybe.
2024-03-08 08:17:54 -08:00
2a6b098cb8 Fix the pawn unit tests 2024-02-25 10:51:27 -08:00
a5e8f33afe [core] Implement Square::file_rank()
Returns a tuple of the square's file and rank.
2024-02-05 13:59:58 -08:00
1f78d4811a [core] Declare Rank::PAWN_STARTING_RANKS
This is a slice that declares the pawn starting ranks for each color.
2024-01-29 14:46:16 -08:00
21c81f237a [core] Implement as_index() for range_bound_struct 2024-01-29 14:46:16 -08:00
025ceb2694 [core] Move the contents of board::square to core::cordinates
Export Square, Direction, Rank, and File from the core crate.
2024-01-23 17:18:48 -08:00