forked from FOSS/BangleApps
Warn about empty blocks
parent
c06296b1cd
commit
241b6e20ce
|
@ -144,7 +144,7 @@
|
||||||
],
|
],
|
||||||
"no-constant-condition": "off",
|
"no-constant-condition": "off",
|
||||||
"no-delete-var": "off",
|
"no-delete-var": "off",
|
||||||
"no-empty": "off",
|
"no-empty": ["warn", { "allowEmptyCatch": true }],
|
||||||
"no-global-assign": "off",
|
"no-global-assign": "off",
|
||||||
"no-inner-declarations": "off",
|
"no-inner-declarations": "off",
|
||||||
"no-prototype-builtins": "off",
|
"no-prototype-builtins": "off",
|
||||||
|
|
|
@ -104,7 +104,6 @@ Bangle.on('lcdPower',on=>{
|
||||||
if (on) {
|
if (on) {
|
||||||
secondInterval = setInterval(draw, 1000);
|
secondInterval = setInterval(draw, 1000);
|
||||||
draw(); // draw immediately
|
draw(); // draw immediately
|
||||||
}else{
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Bangle.on('lock',on=>{
|
Bangle.on('lock',on=>{
|
||||||
|
|
|
@ -270,8 +270,7 @@ function queueDraw() {
|
||||||
|
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
if (pause){}
|
if (!pause){
|
||||||
else{
|
|
||||||
// get date
|
// get date
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
var da = d.toString().split(" ");
|
var da = d.toString().split(" ");
|
||||||
|
|
|
@ -66,10 +66,8 @@ function moveEnemyPosition(){
|
||||||
enemyPositonCenterX2 = 120;
|
enemyPositonCenterX2 = 120;
|
||||||
}else if((randomRoadPositionIndicator2 == 3)){
|
}else if((randomRoadPositionIndicator2 == 3)){
|
||||||
enemyPositonCenterX2 = 155;
|
enemyPositonCenterX2 = 155;
|
||||||
}else if(level == 7||level == 8){
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
} // TODO: else if(level == 7)
|
||||||
}
|
}
|
||||||
|
|
||||||
function collision(){
|
function collision(){
|
||||||
|
|
|
@ -223,9 +223,8 @@ function fixTime() {
|
||||||
Bangle.on("GPS",function cb(g) {
|
Bangle.on("GPS",function cb(g) {
|
||||||
Bangle.setGPSPower(0,"time");
|
Bangle.setGPSPower(0,"time");
|
||||||
Bangle.removeListener("GPS",cb);
|
Bangle.removeListener("GPS",cb);
|
||||||
if (!g.time || (g.time.getFullYear()<2000) ||
|
if (g.time && (g.time.getFullYear()>=2000) &&
|
||||||
(g.time.getFullYear()>2200)) {
|
(g.time.getFullYear()<=2200)) {
|
||||||
} else {
|
|
||||||
// We have a GPS time. Set time
|
// We have a GPS time. Set time
|
||||||
setTime(g.time.getTime()/1000);
|
setTime(g.time.getTime()/1000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,7 @@
|
||||||
var s = width - 1;
|
var s = width - 1;
|
||||||
var x = this.x;
|
var x = this.x;
|
||||||
var y = this.y;
|
var y = this.y;
|
||||||
if ((typeof x === 'undefined') || (typeof y === 'undefined')) {
|
if (x !== undefined && y !== undefined) {
|
||||||
} else {
|
|
||||||
g.setBgColor(COLORS.white);
|
g.setBgColor(COLORS.white);
|
||||||
g.clearRect(old_x, old_y, old_x + width, old_y + height);
|
g.clearRect(old_x, old_y, old_x + width, old_y + height);
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ function novaOpenEyes(speed, white, animation) {
|
||||||
scale: 2.2
|
scale: 2.2
|
||||||
});
|
});
|
||||||
}, speed * 5);
|
}, speed * 5);
|
||||||
} else {}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
g.drawImage(novaEyesStage4(), -10, -10, {
|
g.drawImage(novaEyesStage4(), -10, -10, {
|
||||||
|
@ -126,7 +126,7 @@ function novaOpenEyes(speed, white, animation) {
|
||||||
});
|
});
|
||||||
open = true;
|
open = true;
|
||||||
}, speed * 5);
|
}, speed * 5);
|
||||||
} else {}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ function novaCloseEyes(speed, white, animation) {
|
||||||
g.drawImage(novaEyesStage0(), -10, -10, {
|
g.drawImage(novaEyesStage0(), -10, -10, {
|
||||||
scale: 2.2
|
scale: 2.2
|
||||||
});
|
});
|
||||||
} else {}
|
}
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
g.drawImage(novaEyesStage1(), -10, -10, {
|
g.drawImage(novaEyesStage1(), -10, -10, {
|
||||||
scale: 2.2
|
scale: 2.2
|
||||||
|
@ -164,7 +164,7 @@ function novaCloseEyes(speed, white, animation) {
|
||||||
g.drawImage(novaEyesWhiteStage0(), -10, -10, {
|
g.drawImage(novaEyesWhiteStage0(), -10, -10, {
|
||||||
scale: 2.2
|
scale: 2.2
|
||||||
});
|
});
|
||||||
} else {}
|
}
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
timedraw(true);
|
timedraw(true);
|
||||||
g.drawImage(novaEyesTransStage1(), -10, -10, {
|
g.drawImage(novaEyesTransStage1(), -10, -10, {
|
||||||
|
|
|
@ -486,8 +486,7 @@ function canPlay(hand, palette, otherPalette) {
|
||||||
} else {
|
} else {
|
||||||
//Check if any palette play can win with rule.
|
//Check if any palette play can win with rule.
|
||||||
for(let h of hand.handCards) {
|
for(let h of hand.handCards) {
|
||||||
if(h === c) {}
|
if(h !== c) {
|
||||||
else {
|
|
||||||
clonePalette.addCard(c);
|
clonePalette.addCard(c);
|
||||||
if(isWinningCombo(c, clonePalette, otherPalette)) {
|
if(isWinningCombo(c, clonePalette, otherPalette)) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -531,8 +530,7 @@ class AI {
|
||||||
} else {
|
} else {
|
||||||
//Check if any palette play can win with rule.
|
//Check if any palette play can win with rule.
|
||||||
for(let h of this.hand.handCards) {
|
for(let h of this.hand.handCards) {
|
||||||
if(h === c) {}
|
if(h !== c) {
|
||||||
else {
|
|
||||||
clonePalette.addCard(h);
|
clonePalette.addCard(h);
|
||||||
if(isWinningCombo(c, clonePalette, otherPalette)) {
|
if(isWinningCombo(c, clonePalette, otherPalette)) {
|
||||||
ruleStack.addCard(c);
|
ruleStack.addCard(c);
|
||||||
|
|
|
@ -8,8 +8,6 @@ const hs = require('./heatshrink.js');
|
||||||
if (pc) {
|
if (pc) {
|
||||||
fs = require('fs');
|
fs = require('fs');
|
||||||
var print=console.log;
|
var print=console.log;
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function writeDir(json) {
|
function writeDir(json) {
|
||||||
|
|
|
@ -968,8 +968,7 @@ function activateItem () {
|
||||||
animateToClock();
|
animateToClock();
|
||||||
break;
|
break;
|
||||||
case 0: // food
|
case 0: // food
|
||||||
if (tama.sleep) {
|
if (!tama.sleep) {
|
||||||
} else {
|
|
||||||
// evolution = 0;
|
// evolution = 0;
|
||||||
mode = 'food';
|
mode = 'food';
|
||||||
lightSelect = 0;
|
lightSelect = 0;
|
||||||
|
@ -979,8 +978,7 @@ function activateItem () {
|
||||||
mode = 'light';
|
mode = 'light';
|
||||||
break;
|
break;
|
||||||
case 2: // game
|
case 2: // game
|
||||||
if (tama.sleep) {
|
if (!tama.sleep) {
|
||||||
} else {
|
|
||||||
animateToGame();
|
animateToGame();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue