Commit graph

8 commits

Author SHA1 Message Date
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