Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var possibleSolutions = findPossibleSolutions(originalBoard, pieces);
- var validSolutions = possibleSolutions.filter(function (solutionBoard) {
- return isBoardValid(originalBoard, solutionBoard);
- });
- var scores = validSolutions.map(function (solutionBoard) {
- return calculateScore(originalBoard, solutionBoard);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement