fixed game ending when out of time or energy