Fix: remove useless codes
This commit is contained in:
@@ -52,29 +52,12 @@ var TypingExamination = {
|
||||
this.averageTypingSpeedText = new AverageTypingSpeed();
|
||||
// this.contentProgressText = new ContentProgress();
|
||||
|
||||
this.stageTimer = new StageTimer(
|
||||
TypingExamination.GAME_TIME_SEC,
|
||||
(function() {
|
||||
this.setClickEnable(false);
|
||||
this.timeOver();
|
||||
}).bind(this)
|
||||
);
|
||||
this.stageTimer.setDisplayType(StageTimer.DISPLAY_TYPE_NON_SEC);
|
||||
|
||||
|
||||
|
||||
// typing content
|
||||
var typingContentBG = new TypingContentBG();
|
||||
typingContentBG.makeExaminationContentBG();
|
||||
|
||||
this.animalList = new AnimalList(670);
|
||||
|
||||
|
||||
|
||||
|
||||
var TYPING_CONTENT_X = 60;
|
||||
var TYPING_CONTENT_X = 50;
|
||||
var TYPING_CONTENT_Y = 340;
|
||||
var RECORD_POSITION_X = 960;
|
||||
var RECORD_POSITION_X = 970;
|
||||
|
||||
var FONT_SIZE = 32;
|
||||
var TYPING_TEXT_OFFSET_HEIGHT = 40;
|
||||
@@ -177,6 +160,8 @@ var TypingExamination = {
|
||||
|
||||
|
||||
|
||||
this.animalList = new AnimalList(670);
|
||||
|
||||
// bottom ui
|
||||
var screenBottomUI = new ScreenBottomUI();
|
||||
screenBottomUI.printLeftTextWithAppHighestRecord(sessionStorageManager.getAppHighestRecord());
|
||||
@@ -230,9 +215,6 @@ var TypingExamination = {
|
||||
|
||||
this.showTypingExaminationContents();
|
||||
this.showPlayingWordNumber();
|
||||
// this.updateKeyboard();
|
||||
|
||||
this.stageTimer.start();
|
||||
},
|
||||
|
||||
timeOver: function() {
|
||||
@@ -406,12 +388,11 @@ var TypingExamination = {
|
||||
}
|
||||
|
||||
this.showTypingContentHighlight(inputContent, typingContent);
|
||||
// this.updateKeyboard();
|
||||
},
|
||||
|
||||
showTypingContentHighlight: function(inputContent, typingContent) {
|
||||
console.log(inputContent + "=");
|
||||
console.log(typingContent + "=");
|
||||
// console.log(inputContent + "=");
|
||||
// console.log(typingContent + "=");
|
||||
|
||||
this.textTypingContent.clearColors();
|
||||
this.textTypingContent.addColor(TypingExamination.COLOR_CONTENT_RIGHT, 0);
|
||||
@@ -426,297 +407,14 @@ var TypingExamination = {
|
||||
// console.log("inputContent.charAt(i) : " + inputContent.charAt(i));
|
||||
|
||||
if(typingContent.charAt(i) != inputContent.charAt(i)) {
|
||||
console.log("inputContent.charAt(" + i + ") : " + inputContent.charCodeAt(i).toString(16) + ", " + inputContent.charAt(i));
|
||||
console.log("typingContent.charAt(" + i + ") : " + typingContent.charCodeAt(i).toString(16) + ", " + typingContent.charAt(i));
|
||||
// console.log("inputContent.charAt(" + i + ") : " + inputContent.charCodeAt(i).toString(16) + ", " + inputContent.charAt(i));
|
||||
// console.log("typingContent.charAt(" + i + ") : " + typingContent.charCodeAt(i).toString(16) + ", " + typingContent.charAt(i));
|
||||
this.textTypingContent.addColor(TypingExamination.COLOR_CONTENT_INPUT, i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
updateKeyboard: function() {
|
||||
var inputContent = this.inputTextContent.canvasInput.value();
|
||||
var typingContent = this.typingExaminationContents[this.typingIndex];
|
||||
|
||||
this.hideHighlightKey(this.highlightKey);
|
||||
this.highlightKey = this.getHighlioghtKey(inputContent, typingContent);
|
||||
// console.log(this.highlightKey);
|
||||
this.showHighlightKey(this.highlightKey);
|
||||
this.moveHands(this.highlightKey);
|
||||
},
|
||||
*/
|
||||
|
||||
getHighlioghtKey: function(inputContent, typingContent) {
|
||||
if(typingContent == undefined)
|
||||
return undefined;
|
||||
|
||||
var highlightKey = "";
|
||||
var inputIndex = inputContent.length - 1;
|
||||
var inputLength = inputContent.length;
|
||||
var typingLength = typingContent.length;
|
||||
// console.log("inputLength : " + inputLength + " / " + inputContent);
|
||||
// console.log("typingLength : " + typingLength + " / " + typingContent);
|
||||
var misspelledIndex = -1;
|
||||
for(var i = 0; i < typingLength; i++) {
|
||||
// console.log("inputContent[i] : " + inputContent[i] + ", typingContent[i] : " + typingContent[i]);
|
||||
if(inputContent[i] != typingContent[i]) {
|
||||
misspelledIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// over typing
|
||||
if(inputLength > typingLength) {
|
||||
highlightKey = "Backspace";
|
||||
}
|
||||
|
||||
// complete typing
|
||||
else if(inputContent == typingContent) {
|
||||
highlightKey = "Enter";
|
||||
}
|
||||
|
||||
// english typing test
|
||||
else if(isEnglishTypingApp()) {
|
||||
// console.log("===== english");
|
||||
// console.log("misspelledIndex : " + misspelledIndex);
|
||||
// console.log("inputIndex : " + inputIndex);
|
||||
if(misspelledIndex > inputIndex)
|
||||
highlightKey = typingContent[misspelledIndex];
|
||||
else
|
||||
highlightKey = "Backspace";
|
||||
}
|
||||
// korean typing test
|
||||
else {
|
||||
// console.log(misspelledIndex + " / " + typingContent[misspelledIndex]);
|
||||
if(typingContent[misspelledIndex] == " ")
|
||||
highlightKey = " ";
|
||||
else {
|
||||
var inputLetter = "";
|
||||
var typingLetter = "";
|
||||
var typingNextLetter = "";
|
||||
|
||||
// console.log("-----");
|
||||
// console.log("inputConent : '" + inputContent + "'");
|
||||
// console.log("inputIndex : " + inputIndex);
|
||||
// console.log("typingLength : " + typingLength);
|
||||
// console.log("misspelledIndex : " + misspelledIndex);
|
||||
|
||||
if(inputIndex < 0)
|
||||
inputLetter = "";
|
||||
else if(misspelledIndex > inputIndex)
|
||||
inputLetter = "";
|
||||
else
|
||||
inputLetter = inputContent[misspelledIndex];
|
||||
typingLetter = typingContent[misspelledIndex];
|
||||
if(misspelledIndex <= typingContent.length)
|
||||
typingNextLetter = typingContent[misspelledIndex + 1];
|
||||
|
||||
// console.log("inputLetter : '" + inputLetter + "'");
|
||||
// console.log("typingLetter : '" + typingLetter + "'");
|
||||
// console.log("typingNextLetter : '" + typingNextLetter + "'");
|
||||
|
||||
// var typingAlphabet = "";
|
||||
var inputLetterAlphabets = StringUtil.toKoreanAlphabets(inputLetter);
|
||||
// var typingLetterAlphabets = StringUtil.toKoreanAlphabets(typingLetter);
|
||||
// var typingNextLetterAlphabets = StringUtil.toKoreanAlphabets(typingNextLetter);
|
||||
// console.log("inputLetterAlphabets : " + inputLetterAlphabets);
|
||||
// console.log("typingLetterAlphabets : " + typingLetterAlphabets);
|
||||
// console.log("typingNextLetterAlphabets : " + typingNextLetterAlphabets);
|
||||
|
||||
if(misspelledIndex < inputIndex) {
|
||||
highlightKey = "Backspace";
|
||||
}
|
||||
|
||||
// typing nothing yet
|
||||
else if(inputLetterAlphabets.length == 0) {
|
||||
// highlightKey = typingLetterAlphabets[0];
|
||||
highlightKey = StringUtil.chosung(typingLetter);
|
||||
}
|
||||
|
||||
// after typing chosung
|
||||
else if(inputLetterAlphabets.length == 1) {
|
||||
if(StringUtil.chosung(inputLetter) != StringUtil.chosung(typingLetter))
|
||||
highlightKey = "Backspace";
|
||||
else {
|
||||
if(StringUtil.isMultiAlphabetJungsung(StringUtil.jungsung(typingLetter))) {
|
||||
// console.log("* multi jungsung");
|
||||
var jungsungLetter = StringUtil.jungsung(typingLetter);
|
||||
// console.log("jungsungLetter : " + jungsungLetter);
|
||||
jungsungAlphabets = StringUtil.getMultiAlphabetFromJungsung(jungsungLetter);
|
||||
// console.log("jungsungAlphabets : " + jungsungAlphabets);
|
||||
highlightKey = jungsungAlphabets[0];
|
||||
// console.log(highlightKey);
|
||||
} else {
|
||||
// console.log("* single jungsung");
|
||||
highlightKey = StringUtil.jungsung(typingLetter);
|
||||
// console.log(highlightKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// after typing jungsung
|
||||
else if(inputLetterAlphabets.length == 2) {
|
||||
var typingLetterJungsung = StringUtil.jungsung(typingLetter);
|
||||
// console.log("* 222");
|
||||
// inputLetter jungsung == typingLetter jungsung
|
||||
|
||||
// inputLetter chosung != typingLetter chosung
|
||||
if(StringUtil.chosung(inputLetter) != StringUtil.chosung(typingLetter))
|
||||
highlightKey = "Backspace";
|
||||
|
||||
else if(StringUtil.jungsung(inputLetter) == StringUtil.jungsung(typingLetter)) {
|
||||
if(StringUtil.hasJongsung(typingLetter)) {
|
||||
// highlightKey = StringUtil.jongsung(typingLetter);
|
||||
var typingLetterJongsung = StringUtil.jongsung(typingLetter);
|
||||
// typingLetter jongsung is multi alphabet
|
||||
if(StringUtil.isMultiAlphabetJongsung(typingLetterJongsung)) {
|
||||
var typingJongsungAlphabets = StringUtil.getMultiAlphabetFromJongsung(StringUtil.jongsung(typingLetter));
|
||||
highlightKey = typingJongsungAlphabets[0];
|
||||
}
|
||||
// typingLetter jongsung is single alphabet
|
||||
else {
|
||||
highlightKey = typingLetterJongsung;
|
||||
}
|
||||
} else
|
||||
highlightKey = StringUtil.chosung(typingNextLetter);
|
||||
}
|
||||
// inputLetter jungsung != typingLetter jungsung
|
||||
else {
|
||||
if(StringUtil.isMultiAlphabetJungsung(typingLetterJungsung)) {
|
||||
// console.log("* multi jungsung");
|
||||
var jungsungAlphabets = StringUtil.getMultiAlphabetFromJungsung(typingLetterJungsung);
|
||||
// console.log(" * jungsungAlphabets : " + jungsungAlphabets);
|
||||
if(StringUtil.jungsung(inputLetter) == jungsungAlphabets[0])
|
||||
highlightKey = jungsungAlphabets[1];
|
||||
else
|
||||
highlightKey = "Backspace";
|
||||
}
|
||||
// single letter jungsung
|
||||
else {
|
||||
// console.log("* single jungsung");
|
||||
if(StringUtil.jungsung(inputLetter) != typingLetterJungsung)
|
||||
highlightKey = "Backspace";
|
||||
else {
|
||||
if(StringUtil.hasJongsung(typingLetter)) {
|
||||
// highlightKey = StringUtil.jongsung(typingLetter);
|
||||
var typingLetterJongsung = StringUtil.jongsung(typingLetter);
|
||||
if(StringUtil.isMultiAlphabetJongsung(typingLetterJongsung)) {
|
||||
var jongsungAlphabets = StringUtil.getMultiAlphabetFromJongsung(StringUtil.jongsung(inputLetter));
|
||||
if(StringUtil.jongsung(typingLetter) == jongsungAlphabets[0] && StringUtil.chosung(typingNextLetter) == jongsungAlphabets[1])
|
||||
highlightKey = StringUtil.jungsung(typingNextLetter);
|
||||
else if(StringUtil.jongsung(inputLetter) == jongsungAlphabets[0])
|
||||
highlightKey = jongsungAlphabets[1];
|
||||
else
|
||||
highlightKey = "Backspace";
|
||||
}
|
||||
} else
|
||||
highlightKey = StringUtil.chosung(typingNextLetter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// after typing jongsung
|
||||
else if(inputLetterAlphabets.length == 3) {
|
||||
// inputLetter chosung != typingLetter chosung
|
||||
if(StringUtil.chosung(inputLetter) != StringUtil.chosung(typingLetter))
|
||||
highlightKey = "Backspace";
|
||||
// inputLetter jungsung != typingLetter jungsung
|
||||
else if(StringUtil.jungsung(inputLetter) != StringUtil.jungsung(typingLetter))
|
||||
highlightKey = "Backspace";
|
||||
|
||||
// 입력할 글자에 종성이 있을 경우
|
||||
else if(StringUtil.hasJongsung(typingLetter)) {
|
||||
// console.log("has jongsung");
|
||||
var typingLetterJongsung = StringUtil.jongsung(typingLetter);
|
||||
|
||||
// 입력한 글자의 종성과 입력할 글자의 종성이 같은 경우
|
||||
if(StringUtil.jongsung(inputLetter) == typingLetterJongsung) {
|
||||
if(inputIndex == typingLength - 1)
|
||||
highlightKey = "Enter";
|
||||
else
|
||||
highlightKey = StringUtil.chosung(typingNextLetter);
|
||||
}
|
||||
// 입력한 글자의 종성이 입력할 글자와 다를 경우
|
||||
else {
|
||||
if(inputIndex == typingLength - 1)
|
||||
highlightKey = "Backspace";
|
||||
// 입력할 글자의 종성이 합성자음일 경우
|
||||
else if(StringUtil.isMultiAlphabetJongsung(typingLetterJongsung)) {
|
||||
var inputJongsungAlphabets = StringUtil.getMultiAlphabetFromJongsung(StringUtil.jongsung(inputLetter));
|
||||
var typingJongsungAlphabets = StringUtil.getMultiAlphabetFromJongsung(StringUtil.jongsung(typingLetter));
|
||||
|
||||
// 입력할 글자의 종성과 입력한 글자의 종성이 같은 경우
|
||||
if(typingLetterJongsung == StringUtil.jongsung(inputLetter))
|
||||
highlightKey = StringUtil.chosung(typingNextLetter);
|
||||
else if(StringUtil.jongsung(inputLetter) == typingJongsungAlphabets[0])
|
||||
highlightKey = typingJongsungAlphabets[1];
|
||||
else
|
||||
highlightKey = "Backspace";
|
||||
}
|
||||
// 입력할 글자의 종성이 단자음일 경우 : 알바 -> 앏
|
||||
else {
|
||||
var inputLetterJongsung = StringUtil.jongsung(inputLetter);
|
||||
// console.log("*** single jongsung");
|
||||
// console.log("inputLetter : " + inputLetter);
|
||||
// console.log("StringUtil.jongsung(inputLetter) : " + StringUtil.jongsung(inputLetter));
|
||||
// console.log("inputLetterJongsung : " + inputLetterJongsung);
|
||||
|
||||
if(StringUtil.isMultiAlphabetJongsung(inputLetterJongsung)) {
|
||||
var inputJongsungAlphabets = StringUtil.getMultiAlphabetFromJongsung(StringUtil.jongsung(inputLetter));
|
||||
// console.log("inputJongsungAlphabets : " + inputJongsungAlphabets);
|
||||
if(StringUtil.jongsung(typingLetter) == inputJongsungAlphabets[0] && StringUtil.chosung(typingNextLetter) == inputJongsungAlphabets[1])
|
||||
highlightKey = StringUtil.jungsung(typingNextLetter);
|
||||
else
|
||||
highlightKey = "Backspace";
|
||||
}
|
||||
else {
|
||||
highlightKey = StringUtil.chosung(typingNextLetter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 입력할 글자에 종성이 없을 경우
|
||||
else {
|
||||
// console.log("inputLetter jongsung : " + StringUtil.jongsung(inputLetter))
|
||||
// console.log("typingNextLetter chosung : " + StringUtil.chosung(typingNextLetter))
|
||||
if(StringUtil.hasJongsung(inputLetter)) {
|
||||
// console.log("### has jongsung");
|
||||
if(inputIndex == typingLength - 1)
|
||||
highlightKey = "Backspace";
|
||||
else {
|
||||
if(StringUtil.jongsung(inputLetter) == StringUtil.chosung(typingNextLetter)) {
|
||||
// highlightKey = StringUtil.jungsung(typingNextLetter);
|
||||
if(StringUtil.isMultiAlphabetJungsung(StringUtil.jungsung(typingNextLetter))) {
|
||||
// console.log("* multi jungsung");
|
||||
jungsungAlphabets = StringUtil.getMultiAlphabetFromJungsung(StringUtil.jungsung(typingNextLetter));
|
||||
highlightKey = jungsungAlphabets[0];
|
||||
// console.log(highlightKey);
|
||||
} else {
|
||||
// console.log("* single jungsung");
|
||||
highlightKey = StringUtil.jungsung(typingNextLetter);
|
||||
// console.log(highlightKey);
|
||||
}
|
||||
}
|
||||
else {
|
||||
highlightKey = "Backspace";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
highlightKey = "Backspace";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(highlightKey == " ")
|
||||
highlightKey = "Space";
|
||||
|
||||
return highlightKey;
|
||||
},
|
||||
|
||||
calculateTypingRecord: function(typingContent) {
|
||||
// console.log('입력 단어 : ' + this.typingExaminationContents[this.typingIndex]);
|
||||
|
||||
@@ -767,7 +465,6 @@ var TypingExamination = {
|
||||
this.showTypingExaminationContents();
|
||||
this.showPlayingWordNumber();
|
||||
this.resetTypingContent();
|
||||
// this.updateKeyboard();
|
||||
},
|
||||
|
||||
showPlayingWordNumber: function() {
|
||||
|
||||
@@ -159,7 +159,7 @@ TypingTextManager.prototype.getSplitedSentences = function(sentence) {
|
||||
// if a word is longer than SENTENCE_MAX_CHARACTER
|
||||
// then split the word with SENTENCE_MAX_CHARACTER length
|
||||
if(this.isWordTooLong(words[i])) {
|
||||
console.log(words[i]);
|
||||
// console.log(words[i]);
|
||||
if(this.isNotEmptySentence(splitedSentences[sentenceIndex]))
|
||||
sentenceIndex++; // start with new empty sentence
|
||||
|
||||
|
||||
@@ -21,4 +21,9 @@
|
||||
|
||||
트리펠 같은 걸 앓는 이가 냉면에 돈육이나 고추나 파나 마늘이 많이 드는 것은 꺼리지만 냉면 먹은 뒤에 더운 국수물을 청해다 한 사발씩 서서히 마시고 앉은 것은 이 탓이다. 은근히 물어보면 이것을 먹은 이튿날의 효과는 어떤 고명한 이뇨약보다 으뜸간다고 한다.
|
||||
|
||||
냉면은 물론 메밀로 만든다. 메밀로 만든 국수는 사려 놓고 십여 분만 지나면 자리를 잡는다. 물에 풀면 산산이 끊어진다. 시골 외에는 순수한 메밀로 만드는 국수는 극히 희소하다. 국수발이 질기고 끊어지는 않는 것은 소다나 가타쿠리 가루를 섞는 탓이라 한다. 서울의 골목마다 있는 마른 사리 국수 또는 결혼식장에서 주는 국수 오리 속에 몇 퍼센트의 메밀가루가 들었는지는 우리들의 단언할 수 없는 다다. 나는 서울서 횡행하는 국수의 대부분은 옥수수 농매나 그와 유사한 것이 아닌가 한다. 이틀 사흘을 두었다가도 제법 먹을 수 있고 얼렸다가도 더운 국물에 풀면 국수 행세를 할 수 있다. 이것은 국수가 아니고 국수 유사품이다. 평양냉면이나 메밀국수와는 친척간이나 되나마나하다.
|
||||
냉면은 물론 메밀로 만든다. 메밀로 만든 국수는 사려 놓고 십여 분만 지나면 자리를 잡는다. 물에 풀면 산산이 끊어진다. 시골 외에는 순수한 메밀로 만드는 국수는 극히 희소하다. 국수발이 질기고 끊어지는 않는 것은 소다나 가타쿠리 가루를 섞는 탓이라 한다. 서울의 골목마다 있는 마른 사리 국수 또는 결혼식장에서 주는 국수 오리 속에 몇 퍼센트의 메밀가루가 들었는지는 우리들의 단언할 수 없는 다다. 나는 서울서 횡행하는 국수의 대부분은 옥수수 농매나 그와 유사한 것이 아닌가 한다. 이틀 사흘을 두었다가도 제법 먹을 수 있고 얼렸다가도 더운 국물에 풀면 국수 행세를 할 수 있다. 이것은 국수가 아니고 국수 유사품이다. 평양냉면이나 메밀국수와는 친척간이나 되나마나하다.
|
||||
|
||||
Congress is trying to rush $4.5 billion in emergency humanitarian aid to the southwestern border while placing new restrictions on President Trump's immigration crackdown, spurred on by disturbing images of suffering migrant families and of children living in squalor in overcrowded detention facilities.
|
||||
|
||||
가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바
|
||||
|
||||
|
||||
Reference in New Issue
Block a user