public byte[] RetrieveGameStateAndExit() { game.isPaused = true; var state = game.SerializeGameStateBinary(); game.Exit(); return(state); }