How to implement a TIMER in a GAME
Posted on 2000-03-11
I'm programming a game. I've designed it so that after the game starts, it's in a continuous loop that can only be broken by the user choosing to quit or by time running out.
My question is how do I set a timer to run while the program is running and how do I make it interrupt my loop when time is up?
For clarification a real high level design follows:
displays 5X5 matrix of random letters
prompts user for word
reads in word
checks to see if word is on the board
//the user should have 60 seconds to try to find all the words he/she can. After that the loop should be broken and another function called, game_over:
Ask if user wants to play again
if yes call display_board