Skip to content

feat: add UnsafeMoves() method to expose pseudo-legal moves that leav… - #115

Merged
CorentinGS merged 1 commit into
mainfrom
feat/unsafe-moves
Jun 1, 2026
Merged

feat: add UnsafeMoves() method to expose pseudo-legal moves that leav…#115
CorentinGS merged 1 commit into
mainfrom
feat/unsafe-moves

Conversation

@CorentinGS

Copy link
Copy Markdown
Owner

…e own king in check

Implements GitHub issue #110.

  • Add unsafeOnly parameter to standardMoves to filter by inCheck tag
  • Add engine.UnsafeMoves(), Position.UnsafeMoves(), and Game.UnsafeMoves()
  • Add comprehensive tests for pinned pieces, king moves into check, and starting position
  • Also fixes stale Check tags leaking across promotion piece types

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.33%. Comparing base (4d7c30a) to head (101cb40).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
+ Coverage   70.29%   70.33%   +0.04%     
==========================================
  Files          27       27              
  Lines        4181     4187       +6     
==========================================
+ Hits         2939     2945       +6     
  Misses       1110     1110              
  Partials      132      132              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CorentinGS
CorentinGS force-pushed the feat/unsafe-moves branch 3 times, most recently from 56b1931 to 1a56e7a Compare June 1, 2026 20:40
…e own king in check

Implements GitHub issue #110.

- Add unsafeOnly parameter to standardMoves to filter by inCheck tag
- Add engine.UnsafeMoves(), Position.UnsafeMoves(), and Game.UnsafeMoves()
- Add comprehensive tests for pinned pieces, king moves into check, and starting position
@CorentinGS
CorentinGS force-pushed the feat/unsafe-moves branch from 1a56e7a to 101cb40 Compare June 1, 2026 20:43
@CorentinGS
CorentinGS marked this pull request as ready for review June 1, 2026 20:43
@CorentinGS
CorentinGS merged commit 90b7ea9 into main Jun 1, 2026
11 checks passed
@CorentinGS
CorentinGS deleted the feat/unsafe-moves branch June 7, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant