clamshell icon indicating copy to clipboard operation
clamshell copied to clipboard

Add validation to board.SetPlacements

Open artasparks opened this issue 4 years ago • 0 comments

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.

artasparks avatar Feb 06 '21 18:02 artasparks