jgross11 / bless-this-chess

MIT License
0 stars 0 forks source link

Basic move definition and validation #54

Closed jgross11 closed 2 years ago

jgross11 commented 2 years ago

known bugs:

should be able to make mostly valid moves with pieces

jgross11 commented 2 years ago

This is looking great, the comments help a lot with understanding what's going on. Hopefully those bugs won't be too difficult to iron out. Since it looks like you check each square incrementally in isValidMove, would we be able to just ensure each square is empty in the board in its while loop (where it's incrementing the multiplier)?

Yep, that's correct. Capturing friendly pieces can be done by ensuring the value at that index in the array has the same sign as the value at the selected index; those are the easy ones.

Conditional moves and non-hackily making the pawn moves unique will be much more difficult.

jgross11 commented 2 years ago

functionality is good enough for the moment, other things beckon