Skip to content

Commit

Permalink
Merge pull request #3 from taflaj/perf
Browse files Browse the repository at this point in the history
Updated board assembly routine to improve performance.
  • Loading branch information
taflaj authored Oct 29, 2019
2 parents b104b0f + d520b3a commit b67d770
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rullo.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ type Plausibles []Array
// Assemble returns a board with a plausible solution.
func (p Plausibles) Assemble(c chan Board, board *Board, rowNo int) {
if rowNo >= len(p) { // board is assembled
c <- *board
*board = (*board).Duplicate() // to avoid data contamination
c <- (*board).Duplicate() // to avoid data contamination
} else {
for _, row := range p[rowNo] { // choose each plausible solution on this row
(*board)[rowNo] = row
Expand Down

0 comments on commit b67d770

Please sign in to comment.