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