in reply to setup of a small perl game
If this is a web application, you could simply add a couple of hidden fields to your question form, one to track current question and another to track number of attempts. Then increment 'current question' for correct answers and 'attempts' for wrong ones.
Of course, users could cheat by altering the hidden fields. So you could do the same thing with cookies to make it a little more difficult. Or, if you want to get a little fancy, you could use a sessionID.
|
|---|