/// <summary> /// Finishes the game. /// </summary> void Finish() { if (GameLogger != null) { foreach (var agent in OrderedAgentList) { GameLogger.Log($"{Day},status,{agent.AgentIdx},{RoleOf(agent)},{StatusOf(agent)},{agentNameMap[agent]}"); } GameLogger.Log($"{Day},result,{AliveHumanList.Count},{AliveWolfList.Count},{GetWinner()}"); GameLogger.Close(); } foreach (var agent in AgentList) { gameServer.Finish(agent); } }
/// <summary> /// Cleanup game state and data. /// </summary> protected void OnDestroy() { GameLogger.Info("Game exiting."); GameLogger.Close(); }