@@ -139,7 +139,7 @@ function particle(x, y) {
|
||||
this.yv = randInt(particlesMinSpeed, particlesMaxSpeed, false);
|
||||
this.size = randInt(particlesMinSize, particlesMaxSize, true);
|
||||
this.r = randInt(2, 36);
|
||||
this.g = randInt(135, 150;
|
||||
this.g = randInt(135, 150);
|
||||
this.b = randInt(190, 255);
|
||||
}
|
||||
|
||||
@@ -159,4 +159,4 @@ function randInt(min, max, positive) {
|
||||
|
||||
}
|
||||
|
||||
draw();
|
||||
drawClickAnimation();
|
||||
|
@@ -1,5 +1,7 @@
|
||||
const canvas = document.getElementById('minesweeper-game');
|
||||
const ctx = canvas.getContext('2d');
|
||||
const container = document.getElementById('game-container');
|
||||
const timeEl = document.getElementById('time');
|
||||
|
||||
const fieldSize = {x: 16, y: 12};
|
||||
let tileSize;
|
||||
@@ -16,6 +18,9 @@ let zoomFactor = 1;
|
||||
|
||||
let renderingConfig;
|
||||
|
||||
let startTime = 0;
|
||||
let timer;
|
||||
|
||||
/**
|
||||
* Defines all possible colors for the tile numbers
|
||||
* @type {{ 1: string, 2: string, 3: string, 4: string, 6: string }}
|
||||
@@ -482,6 +487,7 @@ overlay2Canvas.addEventListener("click", (e) => {
|
||||
|
||||
if (isFirstClick) {
|
||||
initBombs(pos.x, pos.y);
|
||||
initTime();
|
||||
isFirstClick = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user