Skip to content

Commit

Permalink
variable name: mcc
Browse files Browse the repository at this point in the history
  • Loading branch information
sjnam committed Nov 21, 2021
1 parent 437fdb2 commit 6d7b537
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions examples/filomino/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func main() {
nr, _ := strconv.Atoi(dimen[0])
nc, _ := strconv.Atoi(dimen[1])

d := dlx.NewMCC()
res := d.Dance(fd)
mcc := dlx.NewMCC()
res := mcc.Dance(fd)

box := make([][]int, nr)
for i := range box {
Expand Down
4 changes: 2 additions & 2 deletions examples/langford/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func main() {
}
n, _ := strconv.Atoi(os.Args[1])

d := dlx.NewMCC()
res := d.Dance(langfordDLX(n))
mcc := dlx.NewMCC()
res := mcc.Dance(langfordDLX(n))

s := make([]int, 2*n)
for sol := range res.Solutions {
Expand Down
8 changes: 4 additions & 4 deletions examples/partridge/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ func main() {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Minute)
defer cancel()

d := dlx.NewMCC()
d.PulseInterval = 10 * time.Second
d = d.WithContext(ctx)
res := d.Dance(patridgeDLX(8))
mcc := dlx.NewMCC()
mcc.PulseInterval = 10 * time.Second
mcc = mcc.WithContext(ctx)
res := mcc.Dance(patridgeDLX(8))

go func() {
for {
Expand Down
4 changes: 2 additions & 2 deletions examples/pentominoes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func main() {
nr, _ := strconv.Atoi(dimen[0])
nc, _ := strconv.Atoi(dimen[1])

d := dlx.NewMCC()
res := d.Dance(fd)
mcc := dlx.NewMCC()
res := mcc.Dance(fd)

box := make([][]string, nr)
for i := range box {
Expand Down
4 changes: 2 additions & 2 deletions examples/queen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ func main() {
}
n, _ := strconv.Atoi(os.Args[1])

d := dlx.NewMCC()
res := d.Dance(queenDLX(n))
mcc := dlx.NewMCC()
res := mcc.Dance(queenDLX(n))

i := 0
board := make([][]string, n)
Expand Down
4 changes: 2 additions & 2 deletions examples/sudoku/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ func sudokuSolver(stream <-chan string) <-chan [][]byte {
defer close(ch)

for line := range stream {
d := dlx.NewMCC()
res := d.Dance(sudokuDLX(strings.NewReader(line)))
mcc := dlx.NewMCC()
res := mcc.Dance(sudokuDLX(strings.NewReader(line)))

ans := []byte(line)
for _, opt := range <-res.Solutions {
Expand Down
4 changes: 2 additions & 2 deletions examples/wordsearch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ func main() {
log.Fatal(err)
}

d := dlx.NewMCC()
res := d.Dance(
mcc := dlx.NewMCC()
res := mcc.Dance(
wordSearchDLX(strings.Fields(string(buf)), wd, ht))

i := 0
Expand Down
4 changes: 2 additions & 2 deletions examples/zebra/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ const xccInput = `
`

func main() {
d := dlx.NewMCC()
res := d.Dance(strings.NewReader(xccInput))
mcc := dlx.NewMCC()
res := mcc.Dance(strings.NewReader(xccInput))

answer := map[byte][]string{
'N': make([]string, 5),
Expand Down

0 comments on commit 6d7b537

Please sign in to comment.