I'm creating a game with puzzles. On every passage you'll have clues and need to fill in a textbox with the correct answer to be able to continue forward to the next passage/puzzle.
I allready have the code that works for one specific answer. But I would like to like to have a little change so I can easily ad more correct answer for example.
If the correct answer is ''oakwood va clinic'' I would like that ''oakwood clinic'' and ''oakwood va'' is also the right awnser to proceed.
Hope you guys can help me!
this is my current code:
<<set $answer to ''>>\
<<textbox '$answer' '' autofocus>>
<<button 'Send Intel'>>
<<set $answer to $answer.trim().toLowerCase().replace(/\s\s+/g, ' ')>>
<<if $answer is "oakwood va clinic">>
[[Mission 3 Succeeded]]\
<<run $('#textbox-answer').attr('readonly', 'true');>>
Incorrect. Please try again.\