We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e03c4ac commit 0428634Copy full SHA for 0428634
1 file changed
index.html
@@ -289,6 +289,7 @@ <h2>Mines:</h2>
289
background(255);
290
game.drawGame();
291
clickLogic();
292
+
293
if ((!mouseIsPressed || touches.count == 0) && lastClick) {
294
buttonLogic();
295
}
@@ -297,6 +298,18 @@ <h2>Mines:</h2>
297
298
game.drawHUD();
299
300
301
+ function keyPressed() {
302
+ if (keyCode === 32) {
303
+ let mX = Math.floor((mouseX - border) / cellSize);
304
+ let mY = Math.floor((mouseY - headerSize - border) / cellSize);
305
+ let cell = game.grid[mX + mY * game.width];
306
307
+ if (!cell.revealed) {
308
+ game.flagCell(mX, mY);
309
+ }
310
311
312
313
function clickLogic() {
314
const shortcutsReveal = getPreferenceValue("shortcuts_reveal");
315
const shortcutsFlag = getPreferenceValue("shortcuts_flag");
0 commit comments