Skip to content

Commit

Permalink
Calc start, pos, end
Browse files Browse the repository at this point in the history
  • Loading branch information
hayatroid committed Mar 27, 2024
1 parent b9c4ddd commit 71c60d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Game.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ const props = defineProps<{
id: number
}>()
const word = idioms[props.id].word
const idiom_en = idioms[props.id].idiom_en
const idiom_ja = idioms[props.id].idiom_ja
const start = idiom_en.indexOf(word)
const pos = start + 1
const end = start + word.length
</script>

<template>
Expand Down

0 comments on commit 71c60d8

Please sign in to comment.