Exemplo n.º 1
0
        public Game(string identifier, string name, string homeTeam, string awayTeam)
        {
            _homeBatters    = new List <Batter>( );
            _awayBatters    = new List <Batter>( );
            _homePitchers   = new List <Pitcher>();
            _awayPitchers   = new List <Pitcher>();
            _name           = name;
            _identifier     = identifier;
            _nextHomeBatter = 0;
            _nextAwayBatter = 1;
            _currentAtBat   = new AtBat(_awayBatters[0], _homePitchers[0]);

            _homeBatters  = GetHomeBatters(homeTeam);
            _homePitchers = GetHomePitchers(homeTeam);
            _awayBatters  = GetAwayBatters(awayTeam);
            _awayPitchers = GetAwayPitchers(awayTeam);
        }
Exemplo n.º 2
0
 public Game(string identifier, string name)
 {
     var homeTeam = "Chicago Cubs";
     var awayTeam = "Pittsburg Pirates";
     _homeBatters = GetHomeBatters(homeTeam);
     _awayPitchers = GetAwayPitchers(awayTeam);
     _awayBatters = GetAwayBatters(awayTeam);
     _homePitchers = GetHomePitchers(homeTeam);
     _name = name;
     _homeScore = 0;
     _awayScore = 0;
     _inning = new Inning();
     _nextHomeBatter = 0;
     _nextAwayBatter = 1;
     _identifier = identifier;
     CurrentAtBat = new AtBat(_awayBatters[0], _homePitchers[0]);
 }