Use enum class
Change timing of saving high score

I was calling Write function in 'case GameState::GAMEOVER' per loop. This
is too inefficient.