Originally Posted by
rogster001
Just thinking of this 'allow user to freetype commands without seeing any menus - without using a regex library also - could something like Levenshtein distance algorithm be useful. - As long as the user knows that the total game commands are say: pick up, walk, open, use : And the user is also aware of the names of the
items available in the current room - The available actions in each room would have to be internalised - then when user types "pick up lantern" - This would then have to be matched against the current rooms available actions and if the distance algorithm returns a close enough match (by a pre set threshold) then play is actioned. If not error 'you cant do that here' or whatever.