コード例 #1
0
ファイル: Player.cs プロジェクト: BaziAplikacija/TipsterCup
        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;
            }


        }
コード例 #2
0
ファイル: FormTeam.cs プロジェクト: BaziAplikacija/TipsterCup
        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();
            
        }
コード例 #3
0
ファイル: MainDoc.cs プロジェクト: BaziAplikacija/TipsterCup
 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);
 }
コード例 #4
0
ファイル: MainDoc.cs プロジェクト: BaziAplikacija/TipsterCup
 public void addTeam(Team team)
 {
     Teams.Add(team);
 }