reset solved

This commit is contained in:
Peter Cottle 2013-01-09 13:55:40 -08:00
parent f0a9c66056
commit 36bfd99d9e
6 changed files with 39 additions and 33 deletions

View file

@ -38,13 +38,13 @@ LevelArbiter.prototype.init = function() {
_.each(levels, function(level, index) {
this.validateLevel(level);
var id = levelSequenceName + String(index);
var id = levelSequenceName + String(index + 1);
var compiledLevel = _.extend(
{},
level,
{
index: index,
id: levelSequenceName + String(index),
id: id,
sequenceName: levelSequenceName
}
);
@ -74,6 +74,7 @@ LevelArbiter.prototype.levelSolved = function(id) {
LevelArbiter.prototype.resetSolvedMap = function() {
this.solvedMap = {};
this.syncToStorage();
Main.getEvents().trigger('levelSolved');
};
LevelArbiter.prototype.syncToStorage = function() {