SebLague / Chess-Challenge

Create your own tiny chess bot!
https://www.youtube.com/watch?v=Ne40a5LkK6A
MIT License
1.78k stars 1.06k forks source link

choosing illegal moves #36

Closed PotatMuffin closed 1 year ago

PotatMuffin commented 1 year ago

it would be possible to look through all the pieces on the board and just choose a move (that isn't legal) that removes the opponents queen or one of their rooks. the rules also do not state that this is not allowed.

SebLague commented 1 year ago

I've updated the rules to mention that cheating at chess is not allowed :)

mcthouacbb commented 1 year ago

This doesn't seem to be a problem. ChallengeController.OnMoveChosen validates whether the move is legal, and an illegal move counts as an automatic instant win for the opponent