fixed highscore doubling?

This commit is contained in:
Garrett Finucane 2014-07-31 16:55:56 -04:00
parent 9a84149a91
commit 3ae8fb1291

View file

@ -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;