fixed highscore doubling?
This commit is contained in:
parent
9a84149a91
commit
3ae8fb1291
1 changed files with 3 additions and 1 deletions
|
@ -293,7 +293,9 @@ function isInfringing(hex){
|
|||
function checkGameOver() {
|
||||
for (var i = 0; i < MainHex.sides; i++) {
|
||||
if (isInfringing(MainHex)) {
|
||||
highscores.push(score);
|
||||
if(highscores.indexOf(score) == -1){
|
||||
highscores.push(score);
|
||||
}
|
||||
writeHighScores();
|
||||
gameOverDisplay();
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue