We should add validation to board.SetPlacements. At present, SetPlacements looks like:
func (b *Board) SetPlacements(ml move.List) error {
for _, m := range ml {
b.setColor(m)
}
return nil
}
However, this has the potential to created invalid positions (i.e., captures left on the board). So, once the placements are set, we should ensure the board position is still valid.
We should add validation to
board.SetPlacements
. At present, SetPlacements looks like:However, this has the potential to created invalid positions (i.e., captures left on the board). So, once the placements are set, we should ensure the board position is still valid.