diff --git a/src/game/typing/test/game.js b/src/game/typing/test/game.js index a9388d6..111bede 100644 --- a/src/game/typing/test/game.js +++ b/src/game/typing/test/game.js @@ -233,13 +233,13 @@ var TypingTest = { initTypingData: function() { var typingTextMan = new TypingTextManager(); + // var typingPracticeContents = [ "꿰뚫다" , "워머신", "홧김에" ]; // for debug var typingPracticeContents = this.getTypingTestContents(); - var typingPracticeContents = [ "꿰뚫다" , "워머신", "홧김에" ]; // console.log(typingPracticeContents); typingTextMan.makeTestContents(typingPracticeContents); var wordCountForStage = TypingTest.WORD_COUNT_FOR_STAGE; - if(isDebugMode()) - wordCountForStage = 3; + // if(isDebugMode()) + // wordCountForStage = 3; typingTextMan.slice(0, wordCountForStage); this.typingRandomContents = typingTextMan.getContents(); // console.log(this.typingRandomContents); @@ -464,10 +464,20 @@ var TypingTest = { } } + // over typing + if(inputLength > typingLength) { + highlightKey = "Backspace"; + } + + // complete typing + else if(inputContent == typingContent) { + highlightKey = "Enter"; + } + // english typing test - if(isEnglishTypingApp()) { - // console.log("===== english"); - // console.log("misspelledIndex : " + misspelledIndex); + else if(isEnglishTypingApp()) { + console.log("===== english"); + console.log("misspelledIndex : " + misspelledIndex); if(inputLength == typingLength) highlightKey = "Enter"; else if(misspelledIndex == -1) @@ -480,8 +490,6 @@ var TypingTest = { // korean typing test else { // console.log(misspelledIndex + " / " + typingContent[misspelledIndex]); - if(inputContent == typingContent) - highlightKey = "Enter"; else if(typingContent[misspelledIndex] == " ") highlightKey = " "; else {