placidfox / JetpackChess

Chess Board Library with Jetpack Compose
GNU General Public License v3.0
1 stars 0 forks source link

Performance Issue with Checkmate Validation #51

Open placidfox opened 9 months ago

placidfox commented 9 months ago

Try to calculate each legalMoves for each piece (own color) in position. better foor decorator move + auto calculate if checkmate way better Castle Validation also do better ?

placidfox commented 9 months ago

Idea : in eachposition isActiveKingCheck is calculate everyTime even for pinned contraints where need check not Active King. Issue possible in isLegalMoves check - create a GamePositionCheck & calculatePotentielPosition fct without everything

placidfox commented 9 months ago

refactor calculateNewPosition (inside GamePosition data class with copy ?)