function game_sudoku_play($id, $game, $attempt, $sudoku, $onlyshow = false, $showsolution = false)
{
    $offsetquestions = game_sudoku_compute_offsetquestions($game->sourcemodule, $attempt, $numbers, $correctquestions);
    if ($game->toptext != '') {
        echo $game->toptext . '<br>';
    }
    game_sudoku_showsudoku($sudoku->data, $sudoku->guess, true, $showsolution, $offsetquestions, $correctquestions, $id, $attempt, $game);
    switch ($game->sourcemodule) {
        case 'quiz':
        case 'question':
            game_sudoku_showquestions_quiz($id, $game, $attempt, $sudoku, $offsetquestions, $numbers, $correctquestions, $onlyshow, $showsolution);
            break;
        case 'glossary':
            game_sudoku_showquestions_glossary($id, $game, $attempt, $sudoku, $offsetquestions, $numbers, $correctquestions, $onlyshow, $showsolution);
            break;
    }
    if ($game->bottomtext != '') {
        echo '<br><br>' . $game->bottomtext;
    }
}
Example #2
0
function game_hiddenpicture_play($id, $game, $attempt, $hiddenpicture, $showsolution, $context)
{
    if ($game->toptext != '') {
        echo $game->toptext . '<br>';
    }
    //Show picture
    $offsetquestions = game_sudoku_compute_offsetquestions($game->sourcemodule, $attempt, $numbers, $correctquestions);
    unset($offsetquestions[0]);
    game_hiddenpicture_showhiddenpicture($id, $game, $attempt, $hiddenpicture, $showsolution, $offsetquestions, $correctquestions, $id, $attempt, $showsolution);
    //Show questions
    $onlyshow = false;
    $showsolution = false;
    switch ($game->sourcemodule) {
        case 'quiz':
        case 'question':
            game_sudoku_showquestions_quiz($id, $game, $attempt, $hiddenpicture, $offsetquestions, $numbers, $correctquestions, $onlyshow, $showsolution, $context);
            break;
        case 'glossary':
            game_sudoku_showquestions_glossary($id, $game, $attempt, $hiddenpicture, $offsetquestions, $numbers, $correctquestions, $onlyshow, $showsolution);
            break;
    }
    if ($game->bottomtext != '') {
        echo '<br><br>' . $game->bottomtext;
    }
}