| @@ 68-80 (lines=13) @@ | ||
| 65 | ||
| 66 | } |
|
| 67 | ||
| 68 | private function is_possible_row($number, $row) |
|
| 69 | { |
|
| 70 | $possible = true; |
|
| 71 | for ($x = 0; $x < $this->limit; $x++) |
|
| 72 | { |
|
| 73 | if (isset($this->sudoku[$row * $this->limit + $x]) && $this->sudoku[$row * $this->limit + $x] == $number) |
|
| 74 | { |
|
| 75 | $possible = false; |
|
| 76 | } |
|
| 77 | } |
|
| 78 | ||
| 79 | return $possible; |
|
| 80 | } |
|
| 81 | ||
| 82 | private function is_possible_col($number, $col) |
|
| 83 | { |
|
| @@ 82-94 (lines=13) @@ | ||
| 79 | return $possible; |
|
| 80 | } |
|
| 81 | ||
| 82 | private function is_possible_col($number, $col) |
|
| 83 | { |
|
| 84 | $possible = true; |
|
| 85 | for ($x = 0; $x < $this->limit; $x++) |
|
| 86 | { |
|
| 87 | if (isset($this->sudoku[$col + $this->limit * $x]) && $this->sudoku[$col + $this->limit * $x] == $number) |
|
| 88 | { |
|
| 89 | $possible = false; |
|
| 90 | } |
|
| 91 | } |
|
| 92 | ||
| 93 | return $possible; |
|
| 94 | } |
|
| 95 | ||
| 96 | private function is_possible_block($number, $block) |
|
| 97 | { |
|