Fix: spaceship image, start random flyingsaucer

This commit is contained in:
2019-01-10 13:07:09 +09:00
parent b8faa417d8
commit 33c70e6d5c
10 changed files with 155 additions and 84 deletions
@@ -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]);