moved player status detection away from game loop