Closed jgross11 closed 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.
functionality is good enough for the moment, other things beckon
known bugs:
should be able to make mostly valid moves with pieces