public bool IsShipInSector(GenericShip anotherShip, ArcType arcType) { GenericArc arc = Arcs.First(n => n.ArcType == arcType); ShotInfoArc arcInfo = new ShotInfoArc(HostShip, anotherShip, arc); bool result = arcInfo.IsShotAvailable; if (arcType == ArcType.Bullseye) { HostShip.CallOnBullseyeArcCheck(anotherShip, ref result); } return(result); }
public int RangeToShipBySector(GenericShip anotherShip, ArcType arcType) { ShotInfoArc arcInfo = GetSectorInfo(anotherShip, arcType); if (arcInfo != null) { bool result = arcInfo.IsShotAvailable; if (arcType == ArcType.Bullseye) { HostShip.CallOnBullseyeArcCheck(anotherShip, ref result); } return(result ? arcInfo.Range : int.MaxValue); } else { return(int.MaxValue); } }
public bool IsShipInSector(GenericShip anotherShip, ArcType arcType) { ShotInfoArc arcInfo = GetSectorInfo(anotherShip, arcType); if (arcInfo != null) { bool result = arcInfo.IsShotAvailable; if (arcType == ArcType.Bullseye) { HostShip.CallOnBullseyeArcCheck(anotherShip, ref result); } return(result); } else { return(false); } }