mirror of
https://github.com/genemecija/learn-morse-code.git
synced 2026-04-06 14:53:54 +00:00
Added wordlist randomization in Challenge mode
This commit is contained in:
parent
f6384b30ef
commit
da142ef58a
9 changed files with 80 additions and 30 deletions
|
|
@ -50,7 +50,7 @@ export default React.memo(function ChallengeMode(props) {
|
|||
if (incorrectMorseIndexes.length > 0) {
|
||||
setMorseCharBuffer(prev => {
|
||||
let newState = prev.split('_').filter(l => l !== '')
|
||||
let x = newState.splice(incorrectMorseIndexes[0], 1)
|
||||
newState.splice(incorrectMorseIndexes[0], 1)
|
||||
newState = newState.join('_') + '_'
|
||||
|
||||
return newState
|
||||
|
|
@ -77,7 +77,7 @@ export default React.memo(function ChallengeMode(props) {
|
|||
setTimeout(() => {
|
||||
getNextWord()
|
||||
setMorseCharBuffer('')
|
||||
}, 1000)
|
||||
}, 500)
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue