Exemplo n.º 1
0
        }
        echo '</p>';
        echo '<div class="tiles">';
        for ($i = $min; $i <= $max; $i++) {
            if ($next->isAvailable($i)) {
                echo '<div class="tile available"><p>';
            } else {
                echo '<div class="tile unavailable"><p>';
            }
            echo "{$i}</p></div>";
        }
        echo '</div>';
        $next = $next->next();
    }
} else {
    if ($stb->isValid()) {
        echo '<h2>Not finished yet</h2>';
        if (isset($turns)) {
            echo '<p>Rolls: ';
            $count = 0;
            foreach ($turns as $t) {
                if ($count != 0) {
                    echo ', ';
                }
                echo $t;
                $count++;
            }
            echo '</p>';
            echo '<p>From these rolls there are ' . $stb->countValidChildren() . ' valid solutions but no way to shut the box...yet!';
        }
    } else {