first successful run to solve a simple puzzle
This commit is contained in:
@@ -14,7 +14,7 @@ func (ns *NakedSingle) SearchProgressableCells() int {
|
||||
ns.field.ForEachPart(func(part board.Part) {
|
||||
part.ForEachCell(func(cell *board.Cell) {
|
||||
candidates := cell.Notes.Get()
|
||||
if len(candidates) == 1 {
|
||||
if len(candidates) == 1 && cell.GetNumber() == 0 {
|
||||
change := board.ExternalChange{
|
||||
Cell: cell,
|
||||
Action: board.ActionSetNumber,
|
||||
@@ -29,6 +29,10 @@ func (ns *NakedSingle) SearchProgressableCells() int {
|
||||
return len(ns.changes)
|
||||
}
|
||||
|
||||
func (ns *NakedSingle) getName() string {
|
||||
return "Naked Single"
|
||||
}
|
||||
|
||||
// ────────────────────────────────────────────────────────────────────────────── //
|
||||
// NAKED_DOUBLE STRUCTURE //
|
||||
// ────────────────────────────────────────────────────────────────────────────── //
|
||||
|
||||
Reference in New Issue
Block a user