Use timed state in snake game example