コード例 #1
0
ファイル: AtBatSimulator.cs プロジェクト: sathalom/BBSim
        private void doHomerun(PositionPlayer _batter, Pitcher _pitcher, DefensiveAttributes.POSITION _hitToPosition, Game _game)
        {
            _game.GetLog().addEvent(_game.CurrentHalfInning, _game.HomeTeamAtBat, _batter.FirstName + " homers to " + POSITION_TEXT[Convert.ToInt32(_hitToPosition)] + "!");
            _game.advanceRunner(Game.BASE.THIRD, 3);
            _game.advanceRunner(Game.BASE.SECOND, 3);
            _game.advanceRunner(Game.BASE.FIRST, 3);
            _game.ScoreRun();
            //TODO: hit++ (batter)
            _game.GetAHit();
            //TODO: hit++ (pitcher)
            //TODO: HR++ (batter)
            //TODO: HR++ (game)
            //TODO: HR++ (pitcher)

            //Temp for analysis
            counter.homeRuns++;
        }