Battlefield.Logic.Players.Player.TakeAShot C# (CSharp) Method

TakeAShot() public method

Player shoots in playfield
public TakeAShot ( ) : int
return int
        public int TakeAShot()
        {
            var coordinates = this.input.GetTargetCoordinates();

            var chainedBombs = new CompositeBomb();

            var bombsDetonated = this.Field.Explode(new Cell(coordinates), this.ChainReactionEnabled, chainedBombs);

            if (this.ChainReactionEnabled)
            {
                this.ChainReactionEnabled = false;
                bombsDetonated += chainedBombs.ChainReact(this.Field);
            }

            return bombsDetonated;
        }