Skip to content

Commit

Permalink
Fixing Puzzle.Submit to select correct puzzle type
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenko committed Jan 18, 2014
1 parent 5a16e06 commit 90a949d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions BeachBall.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ BeachBall.PuzzleConstructor = function(name) {
}
}

this.LoadAnswers = function() {
this.LoadAnswers = function(puzzleType) {
if (!this.error) {
for (i = 0; i < this.size; i++) {
var choice = 0;
Expand All @@ -485,10 +485,13 @@ BeachBall.PuzzleConstructor = function(name) {
text = "False";
}
$('#selectGuess' + i).prop('selectedIndex', choice);
Molpy.PuzzleGens["caged"].guess[i] = text;
Molpy.PuzzleGens[puzzleType].guess[i] = text;
}
if (BeachBall.Settings['CagedAutoClick'].status == 1) {
Molpy.PuzzleGens["caged"].Submit();
if (BeachBall.Settings['CagedAutoClick'].status == 1 & puzzleType = "caged") {
Molpy.PuzzleGens[puzzleType].Submit();
}
else {
Molpy.PuzzleGens[puzzleType].Submit();
}
}
else {
Expand Down Expand Up @@ -544,7 +547,7 @@ BeachBall.SolveLogic = function(name) {
} while (i < 50 && change);

me.CheckAnswers();
me.LoadAnswers();
me.LoadAnswers(name);
}
}

Expand Down

0 comments on commit 90a949d

Please sign in to comment.