Add: practice alphabet

This commit is contained in:
2018-06-18 08:20:19 +09:00
parent 8a26bbdf54
commit b235781141
25 changed files with 405 additions and 162 deletions
@@ -0,0 +1,11 @@
var englishBasicWordList = [
"a",
"s",
"d",
"f",
"j",
"k",
"l",
";",
"'"
];
@@ -0,0 +1,6 @@
var englishLeftLowerWordList = [
"z",
"x",
"c",
"v"
];
@@ -0,0 +1,6 @@
var englishLeftUpperWordList = [
"q",
"w",
"e",
"r"
];
@@ -0,0 +1,7 @@
var englishRightLowerWordList = [
"m",
"m",
",",
".",
"/"
];
@@ -0,0 +1,9 @@
var englishRightUpperWordList = [
"u",
"i",
"o",
"p",
"[",
"]",
"\\"
];
@@ -0,0 +1,8 @@
var englishSecondFingerWordList = [
"g",
"h",
"t",
"y",
"b",
"n"
];
@@ -0,0 +1,12 @@
var englishSentenceList = [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
];
@@ -0,0 +1,12 @@
var englishWordList = [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
];
@@ -0,0 +1,11 @@
var koreanBasicWordList = [
"ㅁ",
"ㄴ",
"ㅇ",
"ㄹ",
"ㅓ",
"ㅏ",
"ㅣ",
";",
"'"
];
@@ -0,0 +1,6 @@
var koreanLeftLowerWordList = [
"ㅋ",
"ㅌ",
"ㅊ",
"ㅍ"
];
@@ -0,0 +1,6 @@
var koreanLeftUpperWordList = [
"ㅂ",
"ㅈ",
"ㄷ",
"ㄱ"
];
@@ -0,0 +1,7 @@
var koreanLeftUpperDoubleWordList = [
"ㅃ",
"ㅉ",
"ㄸ",
"ㄲ",
"ㅆ"
];
@@ -0,0 +1,6 @@
var koreanRightLowerWordList = [
"ㅡ",
",",
".",
"/"
];
@@ -0,0 +1,9 @@
var koreanRightUpperWordList = [
"ㅕ",
"ㅑ",
"ㅐ",
"ㅔ",
"[",
"]",
"\\"
];
@@ -0,0 +1,9 @@
var koreanRightUpperDoubleWordList = [
"ㅕ",
"ㅑ",
"ㅒ",
"ㅖ",
"[",
"]",
"\\"
];
@@ -0,0 +1,8 @@
var koreanSecondFingerWordList = [
"ㅎ",
"ㅗ",
"ㅅ",
"ㅛ",
"ㅠ",
"ㅜ"
];
@@ -0,0 +1,12 @@
var koreanSentenceList = [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
];
@@ -0,0 +1,12 @@
var koreanWordList = [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
];
@@ -1,36 +0,0 @@
class EnglishKeyMapper extends KeyMapper {
constructor() {
super();
this.registerKeyTextData("KeyQ", "q", "Q");
this.registerKeyTextData("KeyW", "w", "W");
this.registerKeyTextData("KeyE", "e", "E");
this.registerKeyTextData("KeyR", "r", "R");
this.registerKeyTextData("KeyT", "t", "T");
this.registerKeyTextData("KeyY", "y", "Y");
this.registerKeyTextData("KeyU", "u", "U");
this.registerKeyTextData("KeyI", "i", "I");
this.registerKeyTextData("KeyO", "o", "O");
this.registerKeyTextData("KeyP", "p", "P");
this.registerKeyTextData("KeyA", "a", "A");
this.registerKeyTextData("KeyS", "s", "S");
this.registerKeyTextData("KeyD", "d", "D");
this.registerKeyTextData("KeyF", "f", "F");
this.registerKeyTextData("KeyG", "g", "G");
this.registerKeyTextData("KeyH", "h", "H");
this.registerKeyTextData("KeyJ", "j", "J");
this.registerKeyTextData("KeyK", "k", "K");
this.registerKeyTextData("KeyL", "l", "L");
this.registerKeyTextData("KeyZ", "z", "Z");
this.registerKeyTextData("KeyX", "x", "X");
this.registerKeyTextData("KeyC", "c", "C");
this.registerKeyTextData("KeyV", "v", "V");
this.registerKeyTextData("KeyB", "b", "B");
this.registerKeyTextData("KeyN", "n", "N");
this.registerKeyTextData("KeyM", "m", "M");
}
}
+136 -46
View File
@@ -51,13 +51,13 @@ class TypingPractice {
.addColor(textPreviewColor[0], 0); .addColor(textPreviewColor[0], 0);
let keyMapper = null; this.keyMapper = new KeyMapper();
if(sessionStorageManager.playingAppName.indexOf("korean") > 0) new Keyboard(this.keyMapper);
keyMapper = new KoreanKeyMapper();
else
keyMapper = new EnglishKeyMapper();
new Keyboard(keyMapper); game.input.keyboard.processKeyPress = () => {
self.checkTypingContents(event);
}
this.shiftKey = game.input.keyboard.addKey(Phaser.Keyboard.SHIFT);
/* /*
@@ -85,7 +85,7 @@ class TypingPractice {
screenBottom.printBottomRightText(sessionStorageManager.playerName); screenBottom.printBottomRightText(sessionStorageManager.playerName);
// this.startGame(); this.startGame();
// this.countDown(); // this.countDown();
} }
@@ -101,26 +101,36 @@ class TypingPractice {
} }
goResult() { goResult() {
this.textTypingContent.clearColors();
this.textTypingContent.addColor(TypingPractice.COLOR_CONTENT_RIGHT, 0);
this.textTypingContent.text = "= 연습 끝 =";
/*
sessionStorageManager.record = this.typingRecordTotal; sessionStorageManager.record = this.typingRecordTotal;
if(sessionStorageManager.record > sessionStorageManager.bestRecord) if(sessionStorageManager.record > sessionStorageManager.bestRecord)
sessionStorageManager.bestRecord = sessionStorageManager.record; sessionStorageManager.bestRecord = sessionStorageManager.record;
location.href = '../../web/client/result.html'; location.href = '../../web/client/result.html';
*/
} }
initTypingData() { initTypingData() {
this.typingContents = this.getTypingPracticeContents(); this.typingContents = this.getTypingPracticeContents();
console.log(this.typingContents);
let randomContents = Phaser.ArrayUtils.shuffle(this.typingContents); let randomContents = Phaser.ArrayUtils.shuffle(this.typingContents);
console.log(randomContents);
this.wordCountForStage = TypingPractice.WORD_COUNT_FOR_STAGE; this.wordCountForStage = TypingPractice.WORD_COUNT_FOR_STAGE;
if(isDebugMode()) if(isDebugMode())
this.wordCountForStage = 3; this.wordCountForStage = 3;
this.typingRandomContents = randomContents.slice(1, this.wordCountForStage + 1); // start Num, end Num (not index) this.typingRandomContents = randomContents.slice(1, this.wordCountForStage + 1); // start Num, end Num (not index)
console.log(this.typingRandomContents);
this.typingContentLength = this.typingContents.length; this.typingContentLength = this.typingContents.length;
this.typingIndex = 0; this.typingIndex = 0;
this.isTyping = false; this.isTyping = false;
this.timeTypingStart = 0; // this.timeTypingStart = 0;
this.timeTypingEnd = 0; // this.timeTypingEnd = 0;
this.typingLetterCountTotal = 0; this.typingLetterCountTotal = 0;
this.typingRecordTotal = 0; this.typingRecordTotal = 0;
@@ -128,22 +138,48 @@ class TypingPractice {
getTypingPracticeContents() { getTypingPracticeContents() {
let TypingPracticeContents = this.loadTestContent(); let TypingPracticeContents = this.loadPracticeContent();
// console.log('playingStageData.language : ' + playingStageData.language); // console.log('playingStageData.language : ' + playingStageData.language);
// console.log('playingStageData.level : ' + playingStageData.level); // console.log('playingStageData.level : ' + playingStageData.level);
// console.log('TypingPracticeContents : ' + TypingPracticeContents); // console.log('TypingPracticeContents : ' + TypingPracticeContents);
this.typingRecordForLines = []; // this.typingRecordForLines = [];
this.typingElapsedTime = []; // this.typingElapsedTime = [];
for(let i = 0; i < TypingPracticeContents.length; i++) { // for(let i = 0; i < TypingPracticeContents.length; i++) {
this.typingRecordForLines[i] = 0; // this.typingRecordForLines[i] = 0;
this.typingElapsedTime[i] = 0; // this.typingElapsedTime[i] = 0;
} // }
return TypingPracticeContents; return TypingPracticeContents;
} }
loadTestContent() { loadTemporaryContent() {
testContent = [
"ㅃ",
"ㅂ",
"ㅈ",
"ㅉ",
"ㄸ",
"ㄷ",
"ㄱ",
"ㄲ",
"ㅅ"
];
// testContent = [
// "a",
// "s",
// "d",
// "f",
// "j",
// "k",
// "l",
// ";",
// "'"
// ];
return testContent;
}
loadPracticeContent() {
let appName = ""; let appName = "";
if(isTypingTestStage()) if(isTypingTestStage())
appName = sessionStorageManager.playingAppName.substring(5); appName = sessionStorageManager.playingAppName.substring(5);
@@ -213,40 +249,87 @@ class TypingPractice {
} }
showTypingPracticeContents() { showTypingPracticeContents() {
for(let i = 0; i < TypingPractice.TYPING_CONTENT_DONE_COUNT; i++) { let doneIndex = this.typingIndex - 1;
let doneIndex = this.typingIndex - i - 1; if(doneIndex < 0)
if(doneIndex < 0) { this.textTypingContentsDone.text = "";
this.textTypingContentsDone[i].text = ""; else
this.textTypingRecordsDone[i].text = ""; this.textTypingContentsDone.text = this.typingRandomContents[doneIndex];
} else { // for(let i = 0; i < TypingPractice.TYPING_CONTENT_DONE_COUNT; i++) {
this.textTypingContentsDone[i].text = this.typingRandomContents[doneIndex]; // let doneIndex = this.typingIndex - i - 1;
this.textTypingRecordsDone[i].text = Math.floor(this.typingRecordForLines[doneIndex]); // if(doneIndex < 0) {
} // this.textTypingContentsDone.text = "";
} // } else {
// this.textTypingContentsDone.text = this.typingRandomContents[doneIndex];
// }
// }
if(this.typingIndex == this.wordCountForStage) { if(this.typingIndex === this.wordCountForStage) {
this.textTypingContent.text = ""; this.textTypingContent.text = "";
return; return;
} }
this.textTypingContent.text = this.typingRandomContents[this.typingIndex]; this.textTypingContent.text = this.typingRandomContents[this.typingIndex];
for(let i = 0; i < TypingPractice.TYPING_CONTENT_PREVIEW_COUNT; i++) { let previewIndex = this.typingIndex + 1;
let previewIndex = this.typingIndex + i + 1; if(previewIndex > this.typingRandomContents.length - 1)
if(previewIndex < this.typingRandomContents.length) this.textTypingContentPreview.text = "";
this.textTypingContentPreview[i].text = this.typingRandomContents[previewIndex]; else
else this.textTypingContentPreview.text = this.typingRandomContents[previewIndex];
this.textTypingContentPreview[i].text = ""; // for(let i = 0; i < TypingPractice.TYPING_CONTENT_PREVIEW_COUNT; i++) {
} // let previewIndex = this.typingIndex + i + 1;
// if(previewIndex < this.typingRandomContents.length)
// this.textTypingContentPreview.text = this.typingRandomContents[previewIndex];
// else
// this.textTypingContentPreview.text = "";
// }
} }
/*
resetTypingContent() { resetTypingContent() {
this.textTypingContent.clearColors(); this.textTypingContent.clearColors();
this.textTypingContent.addColor(TypingPractice.COLOR_CONTENT_WRONG, 0); this.textTypingContent.addColor(TypingPractice.COLOR_CONTENT_RIGHT, 0);
this.inputTextContent.canvasInput.value(''); }
*/
getKeyCode(text) {
return this.keyMapper.getKeyIDOfText(text);
}
isKeyPressed(inputContent, typingContent) {
let inputContentKeyCode = this.getKeyCode(inputContent);
let typingContentKeyCode = this.getKeyCode(typingContent);
if(inputContentKeyCode !== typingContentKeyCode)
return false;
let isShiftInputContent = this.shiftKey.isDown;
let isShiftTypingContent = this.keyMapper.isShiftText(typingContent);
if(isShiftInputContent !== isShiftTypingContent)
return false;
return true;
} }
checkTypingContents(evnet) { checkTypingContents(evnet) {
let inputContent = event.key;
let typingContent = this.typingRandomContents[this.typingIndex];
// if(this.getKeyCode(inputContent) === this.getKeyCode(typingContent)
// && this.getShiftTypeOfText(inputContent) === this.getShiftTypeOfText(typingContent)) {
// console.log("correct key");
// }
// if(shiftKey.isDown)
// console.log(this.shiftKey);
if(this.isKeyPressed(inputContent, typingContent)) {
this.playNextContent();
if(this.typingIndex === this.wordCountForStage) {
this.goResult();
}
}
/*
if(event.keyCode == Phaser.Keyboard.ENTER) { if(event.keyCode == Phaser.Keyboard.ENTER) {
// console.log("### enter ###"); // console.log("### enter ###");
let inputContent = this.inputTextContent.canvasInput.value(); let inputContent = this.inputTextContent.canvasInput.value();
@@ -270,8 +353,10 @@ class TypingPractice {
this.showTypingContentHighlight(); this.showTypingContentHighlight();
} }
*/
} }
/*
showTypingContentHighlight() { showTypingContentHighlight() {
let typingContent = this.typingRandomContents[this.typingIndex]; let typingContent = this.typingRandomContents[this.typingIndex];
let inputContent = this.inputTextContent.canvasInput.value(); let inputContent = this.inputTextContent.canvasInput.value();
@@ -293,7 +378,9 @@ class TypingPractice {
} }
} }
} }
*/
/*
calculateTypingRecord(typingContent) { calculateTypingRecord(typingContent) {
// console.log('입력 단어 : ' + this.typingRandomContents[this.typingIndex]); // console.log('입력 단어 : ' + this.typingRandomContents[this.typingIndex]);
@@ -310,17 +397,17 @@ class TypingPractice {
let typingRecord = (typingContentPlusEnterCount + TypingPractice.TYPING_COUNT_PLUS_ENTER) * 60000 / elapsedTimeMS; let typingRecord = (typingContentPlusEnterCount + TypingPractice.TYPING_COUNT_PLUS_ENTER) * 60000 / elapsedTimeMS;
this.typingElapsedTime[this.typingIndex] = elapsedTimeMS; // this.typingElapsedTime[this.typingIndex] = elapsedTimeMS;
this.typingLetterCountTotal += typingContentPlusEnterCount; this.typingLetterCountTotal += typingContentPlusEnterCount;
this.typingRecordForLines[this.typingIndex] = typingRecord; // this.typingRecordForLines[this.typingIndex] = typingRecord;
// console.log(this.typingRecordForLines[this.typingIndex]); // console.log(this.typingRecordForLines[this.typingIndex]);
let typingElapsedTimeTotal = 0; // let typingElapsedTimeTotal = 0;
for(let i = 0; i <= this.typingIndex; i++) { // for(let i = 0; i <= this.typingIndex; i++) {
// console.log('i : ' + i + ' - time : ' + this.typingElapsedTime[i]); // // console.log('i : ' + i + ' - time : ' + this.typingElapsedTime[i]);
typingElapsedTimeTotal += this.typingElapsedTime[i]; // typingElapsedTimeTotal += this.typingElapsedTime[i];
} // }
this.typingRecordTotal = this.typingLetterCountTotal * 60000 / typingElapsedTimeTotal; // this.typingRecordTotal = this.typingLetterCountTotal * 60000 / typingElapsedTimeTotal;
// console.log(this.typingLetterCountTotal); // console.log(this.typingLetterCountTotal);
// console.log(typingElapsedTimeTotal); // console.log(typingElapsedTimeTotal);
// console.log(typingRecordTotal); // console.log(typingRecordTotal);
@@ -331,18 +418,20 @@ class TypingPractice {
// console.log('typingRecordTotal : ' + typingRecordTotal); // console.log('typingRecordTotal : ' + typingRecordTotal);
// console.log('-----------------------------------'); // console.log('-----------------------------------');
} }
*/
playNextContent() { playNextContent() {
this.typingIndex++; this.typingIndex++;
this.showTypingPracticeContents(); this.showTypingPracticeContents();
this.showPlayingWordNumber(); this.showPlayingWordNumber();
this.resetTypingContent(); // this.resetTypingContent();
} }
showPlayingWordNumber() { showPlayingWordNumber() {
this.contentProgressText.print(this.typingIndex + 1, this.wordCountForStage); this.contentProgressText.print(this.typingIndex + 1, this.wordCountForStage);
} }
/*
setTimeTypingStart() { setTimeTypingStart() {
this.timeTypingStart = game.time.elapsedSince(0); this.timeTypingStart = game.time.elapsedSince(0);
let timeGap = this.timeTypingStart - this.timeTypingEnd; let timeGap = this.timeTypingStart - this.timeTypingEnd;
@@ -356,6 +445,7 @@ class TypingPractice {
// console.log('time gap : ' + (this.timeTypingStart - this.timeTypingEnd)); // console.log('time gap : ' + (this.timeTypingStart - this.timeTypingEnd));
} }
*/
} }
+79 -14
View File
@@ -13,6 +13,13 @@ class KeyMapper {
this.keyboardKeyMap = {}; this.keyboardKeyMap = {};
this.inputKeyMap = {}; this.inputKeyMap = {};
this.registerFunctionKey();
this.registerEnglishKey();
this.registerKoreanKey();
}
registerFunctionKey() {
this.registerKeyTextData("Backquote", "`", "~"); this.registerKeyTextData("Backquote", "`", "~");
this.registerKeyTextData("Digit1", "1", "!"); this.registerKeyTextData("Digit1", "1", "!");
this.registerKeyTextData("Digit2", "2", "@"); this.registerKeyTextData("Digit2", "2", "@");
@@ -52,12 +59,73 @@ class KeyMapper {
this.registerKeyTextData("korean_english", "한/영", "한/영"); this.registerKeyTextData("korean_english", "한/영", "한/영");
this.registerKeyTextData("AltRight", "alt", "alt"); this.registerKeyTextData("AltRight", "alt", "alt");
this.registerKeyTextData("ControlRight", "ctrl", "ctrl"); this.registerKeyTextData("ControlRight", "ctrl", "ctrl");
console.log(this.keyboardKeyMap);
} }
registerKeyTextData(keyID, normalText, shiftText, shiftHandSide) { registerEnglishKey() {
this.keyboardKeyMap[keyID] = new KeyTextData(normalText, shiftText, shiftHandSide); this.registerKeyTextData("KeyQ", "q", "Q");
this.registerKeyTextData("KeyW", "w", "W");
this.registerKeyTextData("KeyE", "e", "E");
this.registerKeyTextData("KeyR", "r", "R");
this.registerKeyTextData("KeyT", "t", "T");
this.registerKeyTextData("KeyY", "y", "Y");
this.registerKeyTextData("KeyU", "u", "U");
this.registerKeyTextData("KeyI", "i", "I");
this.registerKeyTextData("KeyO", "o", "O");
this.registerKeyTextData("KeyP", "p", "P");
this.registerKeyTextData("KeyA", "a", "A");
this.registerKeyTextData("KeyS", "s", "S");
this.registerKeyTextData("KeyD", "d", "D");
this.registerKeyTextData("KeyF", "f", "F");
this.registerKeyTextData("KeyG", "g", "G");
this.registerKeyTextData("KeyH", "h", "H");
this.registerKeyTextData("KeyJ", "j", "J");
this.registerKeyTextData("KeyK", "k", "K");
this.registerKeyTextData("KeyL", "l", "L");
this.registerKeyTextData("KeyZ", "z", "Z");
this.registerKeyTextData("KeyX", "x", "X");
this.registerKeyTextData("KeyC", "c", "C");
this.registerKeyTextData("KeyV", "v", "V");
this.registerKeyTextData("KeyB", "b", "B");
this.registerKeyTextData("KeyN", "n", "N");
this.registerKeyTextData("KeyM", "m", "M");
}
registerKoreanKey() {
this.registerKeyTextData("KeyQ", "ㅂ", "ㅃ");
this.registerKeyTextData("KeyW", "ㅈ", "ㅉ");
this.registerKeyTextData("KeyE", "ㄷ", "ㄸ");
this.registerKeyTextData("KeyR", "ㄱ", "ㄲ");
this.registerKeyTextData("KeyT", "ㅅ", "ㅆ");
this.registerKeyTextData("KeyY", "ㅛ", "ㅛ");
this.registerKeyTextData("KeyU", "ㅕ", "ㅕ");
this.registerKeyTextData("KeyI", "ㅑ", "ㅑ");
this.registerKeyTextData("KeyO", "ㅐ", "ㅒ");
this.registerKeyTextData("KeyP", "ㅔ", "ㅖ");
this.registerKeyTextData("KeyA", "ㅁ", "ㅁ");
this.registerKeyTextData("KeyS", "ㄴ", "ㄴ");
this.registerKeyTextData("KeyD", "ㅇ", "ㅇ");
this.registerKeyTextData("KeyF", "ㄹ", "ㄹ");
this.registerKeyTextData("KeyG", "ㅎ", "ㅎ");
this.registerKeyTextData("KeyH", "ㅗ", "ㅗ");
this.registerKeyTextData("KeyJ", "ㅓ", "ㅓ");
this.registerKeyTextData("KeyK", "ㅏ", "ㅏ");
this.registerKeyTextData("KeyL", "ㅣ", "ㅣ");
this.registerKeyTextData("KeyZ", "ㅋ", "ㅋ");
this.registerKeyTextData("KeyX", "ㅌ", "ㅌ");
this.registerKeyTextData("KeyC", "ㅊ", "ㅊ");
this.registerKeyTextData("KeyV", "ㅍ", "ㅍ");
this.registerKeyTextData("KeyB", "ㅠ", "ㅠ");
this.registerKeyTextData("KeyN", "ㅜ", "ㅜ");
this.registerKeyTextData("KeyM", "ㅡ", "ㅡ");
}
registerKeyTextData(keyID, normalText, shiftText) {
this.keyboardKeyMap[keyID] = new KeyTextData(normalText, shiftText);
if(this.inputKeyMap[keyID] === undefined) if(this.inputKeyMap[keyID] === undefined)
this.inputKeyMap[keyID] = keyID; this.inputKeyMap[keyID] = keyID;
@@ -84,23 +152,20 @@ class KeyMapper {
return this.keyboardKeyMap[keyID].shiftText; return this.keyboardKeyMap[keyID].shiftText;
} }
getShiftHandSide(keyID) {
if(this.keyboardKeyMap[keyID] === undefined) {
console.log(keyID);
return "?";
}
return this.keyboardKeyMap[keyID].shiftHandSide;
}
getKeyIDOfText(text) { getKeyIDOfText(text) {
return this.inputKeyMap[text]; return this.inputKeyMap[text];
} }
getShiftTypeOfText(text) { isShiftText(text) {
let keyID = this.getKeyIDOfText(text); let keyID = this.getKeyIDOfText(text);
return this.keyboardKeyMap[keyID].shiftHandSide; let keyTextData = this.keyboardKeyMap[keyID];
if(keyTextData.normalText === text)
return false;
return true;
} }
} }
+14 -11
View File
@@ -13,6 +13,9 @@ class Keyboard {
this.keyUpReservations = []; this.keyUpReservations = [];
game.input.keyboard.addCallbacks(this, this.keyDown, this.keyUp, null); game.input.keyboard.addCallbacks(this, this.keyDown, this.keyUp, null);
// game.input.keyboard.processKeyDown = this.keyDown;
// game.input.keyboard.processKeyUp = this.keyUp;
let shiftKey = game.input.keyboard.addKey(Phaser.KeyCode.SHIFT); let shiftKey = game.input.keyboard.addKey(Phaser.KeyCode.SHIFT);
shiftKey.onDown.add(this.shifted, this); shiftKey.onDown.add(this.shifted, this);
@@ -370,17 +373,17 @@ class Keyboard {
} }
Keyboard.DEFAULT_KEY_SIZE_PX = 46; Keyboard.DEFAULT_KEY_SIZE_PX = 46;
Keyboard.BACKSPACE_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.5; Keyboard.BACKSPACE_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.5;
Keyboard.TAB_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.5; Keyboard.TAB_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.5;
Keyboard.CAPS_LOCK_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.9; Keyboard.CAPS_LOCK_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.9;
Keyboard.ENTER_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.75; Keyboard.ENTER_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.75;
Keyboard.SHIFT_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 2.4; Keyboard.SHIFT_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 2.4;
Keyboard.CTRL_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.7; Keyboard.CTRL_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.7;
Keyboard.WINDOW_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX; Keyboard.WINDOW_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX;
Keyboard.ALT_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.5; Keyboard.ALT_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 1.5;
Keyboard.CHINESE_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX; Keyboard.CHINESE_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX;
Keyboard.SPACE_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 5.9; Keyboard.SPACE_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX * 5.9;
Keyboard.KOREAN_ENGLISH_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX; Keyboard.KOREAN_ENGLISH_KEY_WIDTH_PX = Keyboard.DEFAULT_KEY_SIZE_PX;
Keyboard.KEY_GAP_PX = 6; Keyboard.KEY_GAP_PX = 6;
@@ -1,36 +0,0 @@
class KoreanKeyMapper extends KeyMapper {
constructor() {
super();
this.registerKeyTextData("KeyQ", "ㅂ", "ㅃ");
this.registerKeyTextData("KeyW", "ㅈ", "ㅉ");
this.registerKeyTextData("KeyE", "ㄷ", "ㄸ");
this.registerKeyTextData("KeyR", "ㄱ", "ㄲ");
this.registerKeyTextData("KeyT", "ㅅ", "ㅆ");
this.registerKeyTextData("KeyY", "ㅛ", "ㅛ");
this.registerKeyTextData("KeyU", "ㅕ", "ㅕ");
this.registerKeyTextData("KeyI", "ㅑ", "ㅑ");
this.registerKeyTextData("KeyO", "ㅐ", "ㅒ");
this.registerKeyTextData("KeyP", "ㅔ", "ㅖ");
this.registerKeyTextData("KeyA", "ㅁ", "ㅁ");
this.registerKeyTextData("KeyS", "ㄴ", "ㄴ");
this.registerKeyTextData("KeyD", "ㅇ", "ㅇ");
this.registerKeyTextData("KeyF", "ㄹ", "ㄹ");
this.registerKeyTextData("KeyG", "ㅎ", "ㅎ");
this.registerKeyTextData("KeyH", "ㅗ", "ㅗ");
this.registerKeyTextData("KeyJ", "ㅓ", "ㅓ");
this.registerKeyTextData("KeyK", "ㅏ", "ㅏ");
this.registerKeyTextData("KeyL", "ㅣ", "ㅣ");
this.registerKeyTextData("KeyZ", "ㅋ", "ㅋ");
this.registerKeyTextData("KeyX", "ㅌ", "ㅌ");
this.registerKeyTextData("KeyC", "ㅊ", "ㅊ");
this.registerKeyTextData("KeyV", "ㅍ", "ㅍ");
this.registerKeyTextData("KeyB", "ㅠ", "ㅠ");
this.registerKeyTextData("KeyN", "ㅜ", "ㅜ");
this.registerKeyTextData("KeyM", "ㅡ", "ㅡ");
}
}
@@ -1,4 +1,4 @@
var englishLeftUpperWordList = [ var englishRightUpperWordList = [
"port", "port",
"upside", "upside",
"kid", "kid",
+18 -18
View File
@@ -28,25 +28,25 @@
<script src="../../game/lib/game_over_text.js"></script> <script src="../../game/lib/game_over_text.js"></script>
<!-- Test typing : source files --> <!-- Test typing : source files -->
<script src="../../game/typing/word_list/korean_basic.js"></script> <script src="../../game/typing/alphabet_list/korean_basic.js"></script>
<script src="../../game/typing/word_list/korean_left_upper.js"></script> <script src="../../game/typing/alphabet_list/korean_left_upper.js"></script>
<script src="../../game/typing/word_list/korean_second_finger.js"></script> <script src="../../game/typing/alphabet_list/korean_second_finger.js"></script>
<script src="../../game/typing/word_list/korean_right_upper.js"></script> <script src="../../game/typing/alphabet_list/korean_right_upper.js"></script>
<script src="../../game/typing/word_list/korean_left_lower.js"></script> <script src="../../game/typing/alphabet_list/korean_left_lower.js"></script>
<script src="../../game/typing/word_list/korean_right_lower.js"></script> <script src="../../game/typing/alphabet_list/korean_right_lower.js"></script>
<script src="../../game/typing/word_list/korean_left_upper_double.js"></script> <script src="../../game/typing/alphabet_list/korean_left_upper_double.js"></script>
<script src="../../game/typing/word_list/korean_right_upper_double.js"></script> <script src="../../game/typing/alphabet_list/korean_right_upper_double.js"></script>
<script src="../../game/typing/word_list/korean_word.js"></script> <script src="../../game/typing/alphabet_list/korean_word.js"></script>
<script src="../../game/typing/word_list/korean_sentence.js"></script> <script src="../../game/typing/alphabet_list/korean_sentence.js"></script>
<script src="../../game/typing/word_list/english_basic.js"></script> <script src="../../game/typing/alphabet_list/english_basic.js"></script>
<script src="../../game/typing/word_list/english_left_lower.js"></script> <script src="../../game/typing/alphabet_list/english_left_lower.js"></script>
<script src="../../game/typing/word_list/english_left_upper.js"></script> <script src="../../game/typing/alphabet_list/english_left_upper.js"></script>
<script src="../../game/typing/word_list/english_right_lower.js"></script> <script src="../../game/typing/alphabet_list/english_right_lower.js"></script>
<script src="../../game/typing/word_list/english_right_upper.js"></script> <script src="../../game/typing/alphabet_list/english_right_upper.js"></script>
<script src="../../game/typing/word_list/english_second_finger.js"></script> <script src="../../game/typing/alphabet_list/english_second_finger.js"></script>
<script src="../../game/typing/word_list/english_sentence.js"></script> <script src="../../game/typing/alphabet_list/english_sentence.js"></script>
<script src="../../game/typing/word_list/english_word.js"></script> <script src="../../game/typing/alphabet_list/english_word.js"></script>
<!-- Test typing : source files --> <!-- Test typing : source files -->
<script src="../../game/typing/practice/define_variables.js"></script> <script src="../../game/typing/practice/define_variables.js"></script>