Skip to content

Commit

Permalink
let
Browse files Browse the repository at this point in the history
  • Loading branch information
dye8128 committed Jun 16, 2024
1 parent 2aaa236 commit 3ee31f8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/pages/PlayScreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,9 @@ const all_messages = [{ "content": "かわいそうだね^^\n", "yomi": "かわ
// await fetch("https://kusa.trap.show/api/tasks?level=1&count=20&isSensitive=false").then(res => res.json());
// console.log(all_messages);
const i = ref(0);
let i = 0
show_messages.value.push(all_messages[0]);
keygraph.build(all_messages[i.value].yomi);
keygraph.build(all_messages[i].yomi);
console.log("keyfraph_builded")
const disp = () => {
// console.log("key candidate", keygraph.key_candidate())
Expand Down Expand Up @@ -817,13 +817,13 @@ document.addEventListener("keydown", (e: KeyboardEvent) => {
}
if (keygraph.is_finished()) {
// すべての文字をタイプし終わったとき
i.value++;
console.log(all_messages[i.value].yomi)
show_messages.value.push(all_messages[i.value]);
if (i.value == all_messages.length - 1) {
i++;
console.log(all_messages[i].yomi)
show_messages.value.push(all_messages[i]);
if (i == all_messages.length - 1) {
router.push({ name: 'Result' })
}
keygraph.build(all_messages[i.value].yomi);
keygraph.build(all_messages[i].yomi);
typing_state.value = {
seq_candidate: keygraph.seq_candidates(),
seq_done: keygraph.seq_done(),
Expand Down

0 comments on commit 3ee31f8

Please sign in to comment.