fixes
This commit is contained in:
parent
8121768fe4
commit
3b8e9b85ea
12
classes.php
12
classes.php
@ -85,18 +85,18 @@
|
||||
}
|
||||
|
||||
function containsDuplicates() {
|
||||
foreach(array($this->rows, $this->columns, $this->regions) as $areas) {
|
||||
foreach ($areas as $area) {
|
||||
$unknownBoxes = array_filter($area, "isKnown");
|
||||
foreach($unknownBoxes as $box1) {
|
||||
foreach($unknownBoxes as $box2) {
|
||||
foreach(array_merge($this->rows, $this->columns, $this->regions) as $area) {
|
||||
$knownBoxes = array_filter($area, "isKnown");
|
||||
foreach($area as $box1) {
|
||||
if ($box1->value != UNKNOWN) {
|
||||
foreach($area as $box2) {
|
||||
if (($box1 !== $box2) && ($box1->value == $box2->value)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,8 +5,6 @@ location /sudoku/ {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
index index.php;
|
||||
|
||||
try_files $uri $uri/;
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
|
@ -115,7 +115,7 @@
|
||||
<section>
|
||||
<?php
|
||||
if (isset($warning))
|
||||
echo(" <strong>⚠️ $warning</strong><br/>\n");
|
||||
echo(" <strong>⚠️ $warning ⚠️</strong><br/>\n");
|
||||
else
|
||||
echo(" Remplissez la grille de sorte que chaque ligne, colonne et région (carré de 3×3 cases) contienne tous les chiffres de 1 à 9.\n")
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user