fixed checking
This commit is contained in:
parent
078093eff4
commit
944245f639
2 changed files with 3 additions and 8 deletions
|
@ -146,7 +146,7 @@ var colorSounds = {"#e74c3c": new Audio("../sounds/lowest.ogg"),
|
|||
function Clock(sideLength) {
|
||||
this.fillColor = '#2c3e50';
|
||||
this.angularVelocity = 0;
|
||||
this.position = 0;
|
||||
this.position = 1;
|
||||
this.dy = 0;
|
||||
this.sides = 6;
|
||||
this.blocks = [];
|
||||
|
@ -253,12 +253,7 @@ function Clock(sideLength) {
|
|||
else {
|
||||
history[count].rotate += steps;
|
||||
}
|
||||
|
||||
while (this.position < 0) {
|
||||
this.position += 6;
|
||||
}
|
||||
|
||||
this.position = this.position % this.sides;
|
||||
this.position = (this.position + this.sides) % this.sides;
|
||||
this.blocks.forEach(function(blocks) {
|
||||
blocks.forEach(function(block) {
|
||||
block.targetAngle = block.targetAngle - steps * 60;
|
||||
|
|
|
@ -325,4 +325,4 @@ function checkGameOver() {
|
|||
|
||||
window.onblur = function (e) {
|
||||
if (gameState == 1) gameState = -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue