Exemplo n.º 1
0
 public function testFunctionReturnsArray()
 {
     // moet met test beginnen
     $woorden[] = "aap";
     // $woorden[] = str_split("pop");
     $letters[0] = new Letter(0, 0, 'x');
     //= str_split("aap");
     $letters[1] = new Letter(0, 1, 'a');
     //= str_split("aap");
     $letters[2] = new Letter(0, 2, 'p');
     //= str_split("aap");
     $resultaat = findhorizontal($woorden, $letters);
     $this->assertFalse(is_array($resultaat), "foundwords must be set");
 }
Exemplo n.º 2
0
    case 2:
        $foundHorizontalWords = findhorizontal($woorden, $letters, $wzArray);
        $foundHorizontalReversedWords = findReversehorizontal($woorden, $letters, $wzArray);
        // voegt gevonden woorden de twee bovenstaande samen
        $allFoundWords = array_merge($foundHorizontalWords, $foundHorizontalReversedWords);
        printPuzzle($wzArray, $allFoundWords, $woorden);
        break;
    case 3:
        $foundHorizontalWords = findhorizontal($woorden, $letters, $wzArray);
        $foundHorizontalReversedWords = findReversehorizontal($woorden, $letters, $wzArray);
        $foundVerticalWords = findVertical($woorden, $wzArray);
        $foundVerticalReversedWords = findReverseVertical($woorden, $wzArray);
        $allFoundWords = array_merge($foundHorizontalWords, $foundHorizontalReversedWords, $foundVerticalWords, $foundVerticalReversedWords);
        printPuzzle($wzArray, $allFoundWords, $woorden);
        break;
    case 4:
        $foundHorizontalWords = findhorizontal($woorden, $letters, $wzArray);
        $foundHorizontalReversedWords = findReversehorizontal($woorden, $letters, $wzArray);
        $foundVerticalWords = findVertical($woorden, $wzArray);
        $foundVerticalReversedWords = findReverseVertical($woorden, $wzArray);
        $foundDiagonalWords = findDiagonal($woorden, $wzArray);
        $foundDiagonalReversedWords = findReverseDiagonal($woorden, $wzArray);
        $allFoundWords = array_merge($foundHorizontalWords, $foundHorizontalReversedWords, $foundVerticalWords, $foundVerticalReversedWords, $foundDiagonalWords, $foundDiagonalReversedWords);
        printPuzzle($wzArray, $allFoundWords, $woorden);
        break;
}
?>

    </body>
</html>