PHP code example of davaxi / takuzu
1. Go to this page and download the library: Download davaxi/takuzu library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
davaxi / takuzu example snippets
// ...
$grid = new \Davaxi\Takuzu\Grid();
$grid->setGridFromString(
"1..1...0..\n" .
"..0.1....1\n" .
"......0.01\n" .
"..00......\n" .
".....1..0.\n" .
".....1.1..\n" .
"..0.0...0.\n" .
"1.....00.0\n" .
"..1.0.0.0.\n" .
"0.1.1...01"
);
$resolver = new \Davaxi\Takuzu\Resolver($grid);
$resolver->resolve();
$resolvedGrid = $resolver->getResolvedGrid();