Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,16 @@ <h1>Kaboom</h1>
</label>
</div>
<div>
<label class="form-check-label">
<input id="countdownMode" type="checkbox">
Countdown mode <abbr title="Instead of showing the total number of mines around a tile, show the remaining (based on placed flags)">(?)</abbr>
</label>
<label class="form-check-label">
<input id="countdownMode" type="checkbox">
Countdown mode <abbr title="Instead of showing the total number of mines around a tile, show the remaining (based on placed flags)">(?)</abbr>
</label>
</div>
<div>
<label class="form-check-label">
<input id="questionMarkingDisabled" type="checkbox">
Disable question marking
</label>
</div>
<div>
<button onClick="hint()" class="btn btn-light btn-sm mt-2">Give me a hint</button>
Expand Down
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Game {
this.allowOutside = false;
this.safeMode = false;
this.countdownMode = false;
this.questionMarkingDisabled = false;

this.lastDuration = 0;
this.recalc();
Expand Down Expand Up @@ -331,7 +332,9 @@ class Game {
this.unsure[y][x] = false;
} else if (this.flags[y][x]) {
this.flags[y][x] = false;
this.unsure[y][x] = true;
if (!this.questionMarkingDisabled) {
this.unsure[y][x] = true;
}
} else {
this.flags[y][x] = true;
}
Expand Down Expand Up @@ -861,7 +864,7 @@ function undo() {
game.undo();
}

const SETTINGS = ['debug', 'allowOutside', 'safeMode', 'countdownMode'];
const SETTINGS = ['debug', 'allowOutside', 'safeMode', 'countdownMode', 'questionMarkingDisabled'];

function updateSettings() {
for (const name of SETTINGS) {
Expand Down