diff --git a/Grille.php b/Grille.php index 7760780..60b7625 100644 --- a/Grille.php +++ b/Grille.php @@ -130,4 +130,12 @@ class Grille { unset($this->mots_utilises[$mot_col]); } } + + public function hash() { + $string = ""; + foreach ($this->grille as $ligne) { + $string .= implode("", $ligne); + } + return hash('sha256', $string); + } } \ No newline at end of file diff --git a/index.php b/index.php index f98a0fb..0f655f0 100644 --- a/index.php +++ b/index.php @@ -38,6 +38,33 @@ $grille = new Grille($hauteur, $largeur);
++ | M | +|||||
c | +r | +o | +i | +s | +é | +s | +
+ | t | +|||||
+ | s | +