Filter out characters with a "true" value, e.g か : true さ : false た : false な : false は : false ま : false や : true
Create a new array with characters that have the "true" value (i.e. const selectedCharacters = ["か","や"] in this
example). May use OptionGroup.js as reference (probably add 'ア行' etc rows for katakana characters, and convert romaji to hiragana and katakana against their respective rows. Need to check. *Considering that we may allow users to filter individual letters instead of by rows in the future, it may be wiser to use choiceData.js):
From the selectedCharacters array, derive the candidate characters in the question pool (e.g. the か row contains か き く け and こ, and store the characters in the question pool in a one-dimensional array (i.e. const questionPool = ["か", "き", "く"m",け","こ","や","ゆ","よ"].
Thought Process
Objective:
input array of
[あ, た, ナ]
→ output[あ,い,う,え,お, た,ち,つ,て,と, ナ,ニ,ヌ,ネ,ノ]
か : true さ : false た : false な : false は : false ま : false や : true
const selectedCharacters = ["か","や"]
in this example). May useOptionGroup.js
as reference (probably add 'ア行' etc rows for katakana characters, and convert romaji to hiragana and katakana against their respective rows. Need to check. *Considering that we may allow users to filter individual letters instead of by rows in the future, it may be wiser to usechoiceData.js
):selectedCharacters
array, derive the candidate characters in the question pool (e.g. the か row containsか き く け and こ
, and store the characters in the question pool in a one-dimensional array (i.e.const questionPool = ["か", "き", "く"m",け","こ","や","ゆ","よ"]
.