Skip to main content

Module game

Module game 

Source
Expand description

Game-mode handlers, level catalogue, and the click-validation / hint logic.

Game mode runs alongside the existing solver/explore UI. A player makes deductions themselves; the server accepts a click only if the signed literal is currently forced by the planner state (so guessing is impossible — wrong clicks bounce and bump failures). The hint system has three tiers: a 3-colour heatmap classifying currently-deducible literals by smallest-MUS size, a per-cell “Why?” that surfaces the smallest MUS, and a “give up” that reveals the solution.

Structs§

ClickQuery
HeatmapTiers
Classification of currently-deducible literals into three tiers based on the size of the smallest MUS that deduces them: tier 1 = smallest-MUS-size globally, tier 2 = second-smallest, tier 3 = everything else still deducible.
LevelInfo
StartParams

Enums§

ClickOutcome

Statics§

LEVELS

Functions§

apply_click
Validate a click and, if valid, advance the planner. Pure logic; no HTTP.
compute_heatmap_tiers
find_level
game_click
game_give_up
game_hint_heatmap
game_hint_why
game_play
game_quit
game_select
game_start
is_won
True if the puzzle is fully determined under current known literals (no more provable literals remain).
level_temp_dir_for_test