예제 #1
0
        public void SwapTeams()
        {
            string AuxTeamID = Team1ID;

            Team1ID = Team2ID;
            Team2ID = AuxTeamID;

            SoccerTeam auxTeam = Team1;

            Team1 = Team2;
            Team2 = auxTeam;

            Teams.Clear();
            Teams.Add(Team1ID, Team1);
            Teams.Add(Team2ID, Team2);

            Scores.Clear();
            Scores.Add(Team1ID, 0);
            Scores.Add(Team2ID, 0);

            Fouls.Clear();
            Fouls.Add(Team1ID, 0);
            Fouls.Add(Team2ID, 0);

            PlayingTeamID  = Team1ID;
            AwaitingTeamID = Team2ID;
        }
예제 #2
0
        public Game(string stage, DateTime date, SoccerTeam team1, SoccerTeam team2, string stadium, string city)
        {
            Stage   = stage;
            Date    = date;
            Stadium = stadium;
            City    = city;
            Teams   = new Dictionary <string, SoccerTeam>();
            Scores  = new Dictionary <string, int>();
            Fouls   = new Dictionary <string, int>();

            Team1ID = team1.TeamID;
            Team2ID = team2.TeamID;

            Team1 = team1;
            Team2 = team2;

            Teams.Add(team1.TeamID, team1);
            Teams.Add(team2.TeamID, team2);

            Scores.Add(team1.TeamID, 0);
            Scores.Add(team2.TeamID, 0);

            Fouls.Add(team1.TeamID, 0);
            Fouls.Add(team2.TeamID, 0);

            PlayingTeamID  = team1.TeamID;
            AwaitingTeamID = team2.TeamID;
            //PlayingTeamID = team2.TeamID;
            //AwaitingTeamID = team1.TeamID;

            Team1BallStrength = 50;
            Team2BallStrength = 50;
        }
예제 #3
0
 public Player(SoccerTeam team, int number) : base(20, 1.0, false)
 {
     this.Id        = number.ToString("00");
     this.Team      = team;
     this.IsPlaying = false;
     friction       = 0.025F;
     position       = new Vector2D(0, 0);
 }