Fix: spaceship image, start random flyingsaucer
This commit is contained in:
@@ -57,6 +57,17 @@ ExtractWordManager.prototype.initVariables = function() {
|
||||
}
|
||||
}
|
||||
|
||||
ExtractWordManager.prototype.getWordLevelCount = function() {
|
||||
// console.log("this.easyWordList.length : " + this.easyWordList.length);
|
||||
// console.log("this.hardWordList.length : " + this.hardWordList.length);
|
||||
|
||||
var wordLevelCount = this.easyWordList.length;
|
||||
if(wordLevelCount < this.hardWordList.length)
|
||||
wordLevelCount = this.hardWordList.length;
|
||||
|
||||
return wordLevelCount;
|
||||
}
|
||||
|
||||
ExtractWordManager.prototype.pickOutDifficulty = function(wordList, difficultyForLevel) {
|
||||
var pickOutWordList = [];
|
||||
|
||||
@@ -120,6 +131,12 @@ ExtractWordManager.prototype.getWord = function(wordLevel, difficultyForLevel) {
|
||||
// console.log("wordLevel : " + wordLevel);
|
||||
// console.log("difficultyForLevel : " + difficultyForLevel);
|
||||
|
||||
if(this.easyWordList[wordLevel] == undefined || this.hardWordList[wordLevel] == undefined) {
|
||||
console.log("====== Error ======");
|
||||
console.log("wordLevel : " + wordLevel);
|
||||
console.log("difficultyForLevel : " + difficultyForLevel);
|
||||
}
|
||||
|
||||
var word = "";
|
||||
if(difficultyForLevel == ExtractWordManager.DIFFICULTY_EASY)
|
||||
word = this.spliceRandomWord(this.easyWordList[wordLevel]);
|
||||
|
||||
Reference in New Issue
Block a user