示例#1
0
        public Player GenericGoalKeeperPlayer()
        {
            var rn = new Random();

            var player = new Player
            {
                FirstName     = string.Concat(NameGenerator.GenRandomFirstName(), " ", NameGenerator.GenRandomLastName()),
                AssignedClub  = this.GameObjects.ManagerEntity.AssignedClub,
                Age           = rn.Next(16, 40),
                Positions     = "GK",
                AerialAbility = rn.Next(0, 20),
                Acceleration  = rn.Next(0, 20),
                CommandArea   = rn.Next(0, 20),
                DefPos        = rn.Next(0, 20),
                Handling      = rn.Next(0, 20),
                OneVsOne      = rn.Next(0, 20),
                Heading       = rn.Next(0, 20),
                Reflexes      = rn.Next(0, 20),
                Leadership    = rn.Next(0, 20),
                Pace          = rn.Next(0, 20),
                Passing       = rn.Next(0, 20),
                Stamina       = rn.Next(0, 20),
            };

            return(player);
            // This populates the Player's characteristics with generic data
        }
示例#2
0
        public Player YouthPlayer()
        {
            var rn = new Random();

            var player = new Player
            {
                FirstName    = string.Concat(NameGenerator.GenRandomFirstName(), " ", NameGenerator.GenRandomLastName()),
                AssignedClub = this.GameObjects.ManagerEntity.AssignedClub,
                Age          = rn.Next(14, 19),
                Positions    = NameGenerator.GenRandomPosition(),
                Acceleration = rn.Next(0, 20),
                Crossing     = rn.Next(0, 20),
                DefPos       = rn.Next(0, 20),
                Dribbling    = rn.Next(0, 20),
                Finishing    = rn.Next(0, 20),
                Heading      = rn.Next(0, 20),
                Leadership   = rn.Next(0, 20),
                LongShot     = rn.Next(0, 20),
                Movement     = rn.Next(0, 20),
                Marking      = rn.Next(0, 20),
                Pace         = rn.Next(0, 20),
                Passing      = rn.Next(0, 20),
                Stamina      = rn.Next(0, 20),
                Strength     = rn.Next(0, 20),
                Tackling     = rn.Next(0, 20),
                Vision       = rn.Next(0, 20),
                WorkRate     = rn.Next(0, 20),
            };

            return(player);
            // This populates the Player's characteristics with generic data
        }