Beispiel #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;
            }


        }
Beispiel #2
0
        public FormTeam(Team team, MainDoc doc)
        {
            InitializeComponent();
            Team = team;
            docMain = doc;

            labels = new List<Label>();
            idMatches = new List<int>();
            homeTeams = new List<String>();
            results = new List<String>();
            guestTeams = new List<String>();
           

            players = docMain.getPlayersFromTeam(Team.Name);
            
            originalWidth = this.Width;
            originalSize = false;
            this.Width = originalWidth - 400;
            tableResults.Visible = false;

            fillFields();
            changeChartView();
            
        }
Beispiel #3
0
 public void addTeam(int id, String name, String city, Double rating, Manager manager, String stadium, String picturePath)
 {
     Team newTeam = new Team(id, name, city, rating, manager, stadium, picturePath);
     Teams.Add(newTeam);
 }
Beispiel #4
0
 public void addTeam(Team team)
 {
     Teams.Add(team);
 }