public void radarNoDetection() { Contract.Ensures(radar == SubControlState.off); radar = SubControlState.off; Console.WriteLine("There are no submarines on the radar"); }
public void radarDetection() { Contract.Ensures(radar == SubControlState.on); radar = SubControlState.on; Console.WriteLine("There is another submarine on the radar, take action"); }