/// <summary> /// Shoot allows a tile to be shot at, and if the tile has been hit before /// it will give an error /// </summary> internal void Shoot() { if ((false == Shot)) { Shot = true; if (_Ship != null) { _Ship.Hit(); } } else { throw new ApplicationException("You have already shot this square"); } }
/// <summary> /// Shoot allows a tile to be shot at, and if the tile has been hit before /// it will give an error /// </summary> internal void Shoot() { if (Shot == false) { Shot = true; if (_Ship is object) { _Ship.Hit(); } } else { throw new ApplicationException("You have already shot this square"); } }