Closed gricha2380 closed 6 years ago
The issue is ~line 107 in battle.js
if(currentWord[i]===enemyArray[x] && enemyArray[x]!==" "){
It's checking the character at the current position. The proper way would be to match the index & character. It may be tricky because I'm removing spaces, but I'll experiment and see.
Repro: Story Mode - hello world start ^ Single char: hello
Player pattern shows:
/^hello/g
and enemymatch is["hello"]
but visual match includes o and l from world.