Ejemplo n.º 1
0
        public FMDraft.Library.Entities.Team ToData()
        {
            var team = new Library.Entities.Team()
            {
                Name            = Name,
                BackgroundColor = BackgroundColor,
                ForegroundColor = ForegroundColor,
                DraftOrder      = DraftOrder,
                City            = City,
                DraftCards      = DraftCards.Select(x => x.ToData()),
                Stadium         = new Stadium()
                {
                    Attendances = StadiumAttendances,
                    Name        = StadiumName
                }
            };

            if (HumanControlled)
            {
                team.ManagerMode = ManagerMode.Player;
            }
            else
            {
                team.ManagerMode = ManagerMode.CPU;

                if (Manager != null)
                {
                    team.Manager = new Library.Entities.Manager()
                    {
                        ID       = Manager.ID,
                        FullName = Manager.Name
                    };
                }
            }

            return(team);
        }
Ejemplo n.º 2
0
        public FMDraft.Library.Entities.Team ToData()
        {
            var team = new Library.Entities.Team()
            {
                Name = Name,
                BackgroundColor = BackgroundColor,
                ForegroundColor = ForegroundColor,
                DraftOrder = DraftOrder,
                City = City,
                DraftCards = DraftCards.Select(x => x.ToData()),
                Stadium = new Stadium()
                {
                    Attendances = StadiumAttendances,
                    Name = StadiumName
                }
            };

            if (HumanControlled)
            {
                team.ManagerMode = ManagerMode.Player;
            }
            else
            {
                team.ManagerMode = ManagerMode.CPU;

                if (Manager != null)
                {
                    team.Manager = new Library.Entities.Manager()
                    {
                        ID = Manager.ID,
                        FullName = Manager.Name
                    };
                }
            }

            return team;
        }