This week has seen the implementation and successful testing of the new abandoned game code. This is necessary for situations where someone has started a game and then wanders off, locking it up for up to ten minutes. The new code detects when there’s been no activity for a fixed period (nominally 30 seconds) and issues a verbal caution asking the player to resume playing. If no activity is detected for a further 15 seconds the game is abandoned and returns to exhibit mode.
This feature has necessitated the writing of a new utility “Timer” class. This is exactly what it says on the tin and has the following methods:
- __init__(name)
- description()
- set(duration in seconds)
- run()
- debug()
- stop()