add point, fix randomize logic

This commit is contained in:
polv committed 2026-03-20 16:05:59 +07:00
1 parent 098608ec30
commit 9aef8fa77b
3 files changed
+111 -8

No files matched your search

@@ -14,18 +14,18 @@ import { nextTick, onMounted, ref, useTemplateRef } from "vue";
const mainEl = useTemplateRef("main"); const mainEl = useTemplateRef("main");
const sentences = ref<number[]>([]); const sentences = ref<number[]>([]);
const i_sentences = ref(NaN); const sentences_array_index = ref(NaN);
function nextSentence() { function nextSentence() {
if (!mainEl.value) return; if (!mainEl.value) return;
const getShuffle = () => { const getCurrentSentenceIndex = () => {
if (sentences.value.length <= 1) { if (sentences.value.length <= 1) {
return 0; return 0;
} }
if (++i_sentences.value < sentences.value.length) { if (++sentences_array_index.value < sentences.value.length) {
return i_sentences.value; return sentences.value[sentences_array_index.value];
} }
sentences.value = sentences.value sentences.value = sentences.value
@@ -33,14 +33,16 @@ function nextSentence() {
.sort((a, b) => a.k - b.k) .sort((a, b) => a.k - b.k)
.map((a) => a.s); .map((a) => a.s);
return 0; sentences_array_index.value = 0;
return sentences.value[sentences_array_index.value];
}; };
i_sentences.value = getShuffle(); const currentSentenceIndex = getCurrentSentenceIndex();
mainEl.value.querySelectorAll("#sentence-quiz > ul > li").forEach((el, i) => { mainEl.value.querySelectorAll("#sentence-quiz > ul > li").forEach((el, i) => {
if (!(el instanceof HTMLElement)) return; if (!(el instanceof HTMLElement)) return;
el.style.display = i === i_sentences.value ? "" : "none"; el.style.display = i === currentSentenceIndex ? "" : "none";
}); });
} }
+101
View File
@@ -0,0 +1,101 @@
# Expressing "over and over again" with "再三"
<SentenceQuiz>
- 老师 _再三_ 强调 这 次 考试 对 我们 很 重要。
<!-- - Lǎoshī _zàisān_ qiángdiào zhè cì kǎoshì duì wǒmen hěn zhòngyào. -->
- The teacher has stressed over and over that this exam is really important for us.
- 这 个 决定 是 经过 _再三_ 考虑 做 出来 的。
<!-- - Zhège juédìng shì jīngguò _zàisān_ kǎolǜ zuò chūlái de. -->
- This decision was made after much consideration.
- 中国 政府 _再三_ 警告 美国 不要 干涉 中国 的 内政。
<!-- - Zhōngguó zhèngfǔ _zàisān_ jǐnggào Měiguó bùyào gānshè Zhōngguó de nèizhèng. -->
- China's government has warned the USA repeatedly not to interfere in China's affairs.
- 她 _再三_ 犹豫 之后,选择 了 放弃 比赛。
<!-- - Tā _zàisān_ yóuyù zhīhòu, xuǎnzé le fàngqì bǐsài. -->
- After hesitating again and again, she chose to quit the competition.
- 我们 _再三_ 考虑 过 后,决定 满足 你 的 这 个 要求。
<!-- - Wǒmen _zàisān_ kǎolǜ guo hòu, juédìng mǎnzú nǐ de zhège yāoqiú. -->
- After having considered it many times, we decided to satisfy this requirement of yours.
- 我 _再三_ 提醒 你 出国 旅游 一定 要 小心 你 的 钱包。
<!-- - Wǒ _zàisān_ tíxǐng nǐ chūguó lǚyóu yīdìng yào xiǎoxīn nǐ de qiánbāo. -->
- I've reminded you again and again that you need to be careful with your wallet when you travel abroad.
- 我 _再三_ 劝 你 不 要 这样 做,你 还是 不 听。
<!-- - Wǒ _zàisān_ quàn nǐ bùyào zhèyàng zuò, nǐ háishì bù tīng. -->
- I've advised you repeatedly not to do this, but you still don't listen.
- 他 _再三_ 表示 不 会 参加 下 一 届 的 奥运会。
<!-- - Tā _zàisān_ biǎoshì bù huì cānjiā xià yī jiè de Àoyùnhuì. -->
- He has repeatedly indicated that he will not participate in the next Olympic Games.
- 我 已经 _再三_ 告诉 你 了 这 次 会议 的 重要性,你 还是 迟到 了。
<!-- - Wǒ yǐjīng _zàisān_ gàosù nǐ le zhè cì huìyì de zhòngyào xìng, nǐ háishì chídào le. -->
- I've already repeatedly told you the importance of this meeting, yet you still showed up late.
- 经过 _再三_ 考虑,我 还是 决定 做 老师。
<!-- - Jīngguò _zàisān_ kǎolǜ, wǒ háishì juédìng zuò lǎoshī. -->
- After thinking it over many times, I have decided to become a teacher.
</SentenceQuiz>
<TOC>
- Level: [B2](https://resources.allsetlearning.com/chinese/grammar/B2_grammar_points) / [HSK5](https://resources.allsetlearning.com/chinese/grammar/HSK5_grammar_points)
- Similar to
- [Expressing "again and again" with "一再"](../C1/一再.md2) (C1)
- [Expressing "lies in" with "在于"](https://resources.allsetlearning.com/chinese/grammar/Expressing_%22lies_in%22_with_%22zaiyu%22) (C1)
- Used for
- Keywords: [再](https://resources.allsetlearning.com/chinese/grammar/%E5%86%8D), [再三](https://resources.allsetlearning.com/chinese/grammar/%E5%86%8D%E4%B8%89)
</TOC>
再三 (zàisān) or means "repeatedly" or "time and again" in a formal way, and is usually placed before a two-syllable verb.
## Structure
Although the verb phrase in the pattern is usually referring to past events, 了 and 过 are generally not used with 再三, but you will sometimes see it.
再三 + Verb Phrase
## Examples
- 老师 _再三_ 强调 这 次 考试 对 我们 很 重要。
<!-- - Lǎoshī _zàisān_ qiángdiào zhè cì kǎoshì duì wǒmen hěn zhòngyào. -->
- The teacher has stressed over and over that this exam is really important for us.
- 这 个 决定 是 经过 _再三_ 考虑 做 出来 的。
<!-- - Zhège juédìng shì jīngguò _zàisān_ kǎolǜ zuò chūlái de. -->
- This decision was made after much consideration.
- 中国 政府 _再三_ 警告 美国 不要 干涉 中国 的 内政。
<!-- - Zhōngguó zhèngfǔ _zàisān_ jǐnggào Měiguó bùyào gānshè Zhōngguó de nèizhèng. -->
- China's government has warned the USA repeatedly not to interfere in China's affairs.
- 她 _再三_ 犹豫 之后,选择 了 放弃 比赛。
<!-- - Tā _zàisān_ yóuyù zhīhòu, xuǎnzé le fàngqì bǐsài. -->
- After hesitating again and again, she chose to quit the competition.
- 我们 _再三_ 考虑 过 后,决定 满足 你 的 这 个 要求。
<!-- - Wǒmen _zàisān_ kǎolǜ guo hòu, juédìng mǎnzú nǐ de zhège yāoqiú. -->
- After having considered it many times, we decided to satisfy this requirement of yours.
- 我 _再三_ 提醒 你 出国 旅游 一定 要 小心 你 的 钱包。
<!-- - Wǒ _zàisān_ tíxǐng nǐ chūguó lǚyóu yīdìng yào xiǎoxīn nǐ de qiánbāo. -->
- I've reminded you again and again that you need to be careful with your wallet when you travel abroad.
- 我 _再三_ 劝 你 不 要 这样 做,你 还是 不 听。
<!-- - Wǒ _zàisān_ quàn nǐ bùyào zhèyàng zuò, nǐ háishì bù tīng. -->
- I've advised you repeatedly not to do this, but you still don't listen.
- 他 _再三_ 表示 不 会 参加 下 一 届 的 奥运会。
<!-- - Tā _zàisān_ biǎoshì bù huì cānjiā xià yī jiè de Àoyùnhuì. -->
- He has repeatedly indicated that he will not participate in the next Olympic Games.
- 我 已经 _再三_ 告诉 你 了 这 次 会议 的 重要性,你 还是 迟到 了。
<!-- - Wǒ yǐjīng _zàisān_ gàosù nǐ le zhè cì huìyì de zhòngyào xìng, nǐ háishì chídào le. -->
- I've already repeatedly told you the importance of this meeting, yet you still showed up late.
- 经过 _再三_ 考虑,我 还是 决定 做 老师。
<!-- - Jīngguò _zàisān_ kǎolǜ, wǒ háishì juédìng zuò lǎoshī. -->
- After thinking it over many times, I have decided to become a teacher.
## See also
- [Again in the future with "再"](https://resources.allsetlearning.com/chinese/grammar/Again_in_the_future_with_%22zai%22)
- [Again in the past with "又"](https://resources.allsetlearning.com/chinese/grammar/Again_in_the_past_with_%22you%22)
## Sources and further reading
### Books
- [Chinese Grammar - Broken down into 100 items - Basic and Intermediate Levels (汉语语法百项讲练 - 初中级)](<https://resources.allsetlearning.com/chinese/grammar/Chinese_Grammar_-_Broken_down_into_100_items_-_Basic_and_Intermediate_Levels_(%E6%B1%89%E8%AF%AD%E8%AF%AD%E6%B3%95%E7%99%BE%E9%A1%B9%E8%AE%B2%E7%BB%83_-_%E5%88%9D%E4%B8%AD%E7%BA%A7)>) (pp. 195-7) [Anything Goes (无所不谈) →buy](https://www.amazon.cn/mn/detailApp?_encoding=UTF8&tag=allset-23&linkCode=as2&asin=B001J0ADWA&camp=536&creative=3132&creativeASIN=B001J0ADWA,)
- [New Practical Chinese Reader 5 (新实用汉语课本5)](<https://resources.allsetlearning.com/chinese/grammar/New_Practical_Chinese_Reader_5_(%E6%96%B0%E5%AE%9E%E7%94%A8%E6%B1%89%E8%AF%AD%E8%AF%BE%E6%9C%AC5)>) (pp. 157) [Anything Goes (无所不谈) →buy](https://www.amazon.cn/mn/detailApp?_encoding=UTF8&tag=allset-23&linkCode=as2&asin=B001J0ADWA&camp=536&creative=3132&creativeASIN=B001J0ADWA,)
- [HSK Standard Course 5上](https://resources.allsetlearning.com/chinese/grammar/HSK_Standard_Course_5%E4%B8%8A) (pp. 126) [Anything Goes (无所不谈) →buy](https://www.amazon.cn/mn/detailApp?_encoding=UTF8&tag=allset-23&linkCode=as2&asin=B001J0ADWA&camp=536&creative=3132&creativeASIN=B001J0ADWA,)
+1 -1
View File
@@ -45,4 +45,4 @@ Subj. + 一再 + Verb
## See also ## See also
- [Expressing "all along" with "一直"](../A2/一直.md) - [Expressing "all along" with "一直"](../A2/一直.md)
- [Expressing "over and over again" with "再三"](https://resources.allsetlearning.com/chinese/grammar/Expressing_%22over_and_over_again%22_with_%22zaisan%22) - [Expressing "over and over again" with "再三"](../B2/再三.md)