private void Results() { bool survivorsAlive = false; bool monsterWon = false; List <Monster> monsters = new List <Monster>(); FindAllInTerrain(out survivorsAlive, monsters); if (survivorsAlive) { result = "SURVIVORS WIN!"; } else if (monsters.Count == 1) { result = monsters[0].player.Nickname + " WINS!"; monsters[0].player.Score += WIN_POINTS; monsterWon = true; } else { result = "NOBODY WINS"; } AddScores(survivorsAlive, monsterWon); LogEntry entry = new LogEntry() { User = "******", Action = result }; logger.LogNewEntry(entry); logger.UpdateQueue(); ServerMain.BroadcastMessage(result); }
public static void StartMatch() { instance.ResetMatch(); ServerMain.BroadcastMessage("MATCH STARTS IN 10 SECONDS"); Thread.Sleep(10000); ServerMain.BroadcastMessage("MATCH STARTED"); instance.Finished = false; Thread.Sleep(Int32.Parse(duration)); instance.Finished = true; instance.Results(); }