Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation to board.SetPlacements #220

Open
artasparks opened this issue Feb 6, 2021 · 0 comments
Open

Add validation to board.SetPlacements #220

artasparks opened this issue Feb 6, 2021 · 0 comments
Assignees
Labels
Difficulty:Kyu Single Digit Kyu Level: Describe well-scoped problems / bugs that require some experience.

Comments

@artasparks
Copy link
Member

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 artasparks added the Difficulty:Kyu Single Digit Kyu Level: Describe well-scoped problems / bugs that require some experience. label Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty:Kyu Single Digit Kyu Level: Describe well-scoped problems / bugs that require some experience.
Projects
None yet
Development

No branches or pull requests

2 participants