-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
factor check for move validity into Board.Apply
It feels more natural and less error-prone to have the Board.Apply method check whether the given move is valid, instead of making it a precondition and counting on the caller to do that. This makes it slightly harder to distinguish whether Board.Apply failed because the move was invalid or illegal, but that can be resolved with better errors if it becomes important. GitHub-Pull-Request: #2
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters