I'm working on a game (sorta) where you can give numeric answers based on what your hear. As soon as a number gets called this number gets saved.
I require the score mechanism to allow the user to answer the number within a certain given time, the order is hereby unrelated.
For example, the available time is 10 seconds. within those 10 seconds 2 and 4 are mentioned. The player can answer, 2 and 4 in any order. The available response time is ofcourse binded to each individual answer, each answer has those ten seconds lifespan before it gets destroyed.
The logic is that the user must answer the heard sounds. Within a round he can't get any mistake, if a mistake is made the round is failed. If he doesn't response within those 10 seconds or give a wrong number that means a fail. If he gets the answer in time that number is ofcourse removed from the array. This is due to the possibility the same number gets called within the time span, like 2 7's within those 10 seconds, the user requires to hit 7 twice.
How can I make an array (or object based array) to remove each inserted number after 10 seconds after insertion.
Note: all given numbers are examples.
Note: the round info is background information and should not be related to the answer as the round continues and only a counter gets increased (as long as the current round hasn't increased the number already)