Ejemplo n.º 1
0
        public Player(int id, String firstName, String lastName, DateTime dateOfBirth, double rating, Team team, Position position) 
            : base(id,firstName,lastName,dateOfBirth)
        {
            Rating = rating;
            Team = team;
            Position = position;

            TokensGoals = (int) Rating * (int) Team.Rating;//vo osnova verojatnosta daden igrac da dade gol e proporcionalna
                                  // na negoviot rejting
            TokensAssists = (int)Rating * (int)Team.Rating / 10;
            TokensInterrupts = (int)Rating * (int)Team.Rating / 10;
            TokensSaves = (int)Rating * (int)Team.Rating / 10;
            switch (Position.Id)
            {
                case 1://Napad
                    TokensGoals *= 3;//Napagacot da ima najgolemi shansi za gol
                    TokensAssists *= 2;
                    TokensInterrupts *= 1;
                    TokensSaves = 0;
                    break;
                case 2://Sredina
                    TokensGoals *= 2;
                    TokensAssists *= 3;
                    TokensInterrupts *= 2;
                    TokensSaves = 0;
                    break;
                case 3://Odbrana
                    TokensGoals /= 10;
                    TokensAssists /= 10;
                    TokensInterrupts *= 5;
                    TokensSaves = 0;
                    break;
                case 4://Golman
                    TokensGoals /= 1000;//Postoi moznost i golman da dade gol, no taa e premnogu mala
                    TokensAssists /= 1000;
                    TokensInterrupts /= 100;
                    TokensSaves = (int)Rating;
                    break;
            }


        }
Ejemplo n.º 2
0
 public void addPosition(int id, String description, double factorGoal, double factorAssist, double factorInterrupt, double factorSave)
 {
     Position newPosition = new Position(id, description, factorGoal, factorAssist, factorInterrupt,factorSave);
     Positions.Add(newPosition);
 }
Ejemplo n.º 3
0
 public void addPosition(Position position)
 {
     Positions.Add(position);
 }