Exemplo n.º 1
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine("##############################################################################################################");
            sb.AppendLine("#                                            General Information                                             #");
            sb.AppendLine("##############################################################################################################");
            sb.AppendLine($"CurrentMap: {CurrentMap}");
            sb.AppendLine($"DefaultRoundTimeMultiplier: {DefaultRoundTimeMultiplier}");
            sb.AppendLine($"GameId: {GameId}");
            sb.AppendLine($"GameMode: {GameMode}");
            sb.AppendLine($"MapVariant: {MapVariant}");
            sb.AppendLine($"MaxPlayers: {MaxPlayers}");
            sb.AppendLine($"WaitingPlayers: {WaitingPlayers}");
            sb.AppendLine($"RoundTime: {RoundTime}");
            sb.AppendLine();

            if (Rush != null)
            {
                sb.AppendLine(Rush.ToString());
            }
            for (int i = 0; i < TeamInfo.Count; i++)
            {
                var team = TeamInfo[i.ToString()];
                sb.AppendLine("##############################################################################################################");
                sb.AppendLine($"#                                             Team {i} Information                                             #");
                sb.AppendLine("##############################################################################################################");

                sb.AppendLine($"| {"PersonaId",13} | {"Tag",4} | {"Name",30} | {"Rank",4} | {"Score",10} | {"Kills",5} | {"Deaths",6} | {"SquadId",7} | {"Role",4} |");
                sb.AppendLine($"|---------------|------|--------------------------------|------|------------|-------|--------|---------|------|");
                foreach (var player in team.Players)
                {
                    sb.AppendLine(player.Value.ToString());
                }
                sb.AppendLine($"|_______________|______|________________________________|______|____________|_______|________|_________|______|");
                sb.AppendLine();
            }

            return(sb.ToString());
        }
Exemplo n.º 2
0
        //public Rush(MemoryStream stream)
        //{
        //    var pos = stream.Position;
        //    Attackers = new RoundInfo(stream, true);
        //    stream.Position = pos;
        //    Defenders = new RoundInfo(stream, false);
        //}

        public Rush(Rush rush)
        {
            this.Defenders = (rush.Defenders == null) ? null : new RoundInfo(rush.Defenders);
            this.Attackers = (rush.Attackers == null) ? null : new RoundInfo(rush.Attackers);
        }