INDAPlus21 / INDAPlus21/murnion-chess
Pass
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**Fantastiskt jobbat!**
My only critique is that you fail one of the tests. However, I judge this to be a case of "but it works on my machine".
```rust
running 23 tests
test tests::game_tests::fen_sets_start_correctly ... ok
test tests::game_tests::get_fen_works_correctly ... ok
test tests::game_tests::fen_sets_inprogress_correctly ... ok
test tests::game_tests::king_pins_correctly ... ok
test tests::game_tests::king_moves_correctly ... ok
test tests::game_tests::king_takes_correctly ... ok
test tests::game_tests::bishop_moves_correctly ... ok
test tests::game_tests::king_checks_correctly ... ok
test tests::game_tests::checkmate_correctly_applies ... ok
test tests::game_tests::bishop_takes_correctly ... ok
test tests::game_tests::black_king_is_threatened_castle_correctly ... ok
test tests::game_tests::black_king_castle_correctly ... ok
test tests::game_tests::knight_moves_correctly ... ok
test tests::game_tests::knight_takes_correctly ... ok
test tests::game_tests::pawn_moves_correctly ... ok
test tests::game_tests::pawn_takes_correctly ... ok
test tests::game_tests::rook_moves_correctly ... ok
test tests::game_tests::rook_takes_correctly ... ok
test tests::game_tests::white_castles ... ok
test tests::game_tests::white_en_passant ... ok
test tests::game_tests::white_king_castle_correctly ... ok
test tests::game_tests::white_king_is_threatened_castle_correctly ... ok
test tests::game_tests::white_promotion ... FAILED
failures:
---- tests::game_tests::white_promotion stdout ----
thread 'tests::game_tests::white_promotion' panicked at 'attempt to subtract with overflow', src\lib.rs:352:87
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
tests::game_tests::white_promotion
test result: FAILED. 22 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
```
You have some repeating code patterns, which could be reduced by using local closures or help functions.
I like your approach to checking for threats. Good job!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the named Rust test, tests::game_tests::white_promotion, and inspect the failure at src/lib.rs:352. Trace the promotion path and verify the fix by rerunning that test and the full test suite; done means all tests pass without overflow. The repeated code patterns are an additional refactoring suggestion, not a defined acceptance condition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100