mockgroundcontroller.java.svn-base

来自「這是一個JAVA語言寫的多代理人程式用來模擬飛機起飛或是降落的程式」· SVN-BASE 代码 · 共 56 行

SVN-BASE
56
字号
package mock;
import java.util.Collection;
import java.util.LinkedList;

import world.Gate;
import world.Runway;
import world.Strip;
import world.Taxiway;
import interfaces.*;
import world.*;
import base.*;
import java.util.*;

public class MockGroundController extends Mock implements GroundControllerInterface {
	
	Tower tower = null;
	public EventLog log = new EventLog();
	public MockGroundController(String name) {
		super(name);
	}
	
	public MockGroundController(String name, Tower tower) {
		super(name);
		this.tower = tower;	
	}
	
    // Landing
    public void msgLeavingRunway (String callNumber, Runway lastPath, Gate gate) { 
    	log.add(new LoggedEvent("Received message msgLeavingRunway"));
    }
    public void msgConfirmTaxiLandingPath (String callNumber, List<Taxiway> taxiInstructions) { 
    	log.add(new LoggedEvent("Received message msgConfirmTaxiLandingPath"));
    }
    public void msgNewArrivalStrip (Strip newArrival) { 
    	log.add(new LoggedEvent("Received message msgNewArrivalStrip"));
    }

    // Takeoff
    public void msgRequestPushBack (String callNumber, Gate gate) { 
    	log.add(new LoggedEvent("Received message msgRequestPushBack"));
    }
    public void msgConfirmPushBack (String callNumber, Runway takeoffRunway, Gate gate) { 
    	log.add(new LoggedEvent("Received message msgConfirmPushBack"));
    }
    public void msgReadyForTaxi (String callNumber, Taxiway currentPosition) { 
    	log.add(new LoggedEvent("Received message msgReadyForTaxi"));
    }
    public void msgConfirmTaxiTakeoffPath (String callNumber, List<Taxiway> path, LocalControllerInterface lc) { 
    	log.add(new LoggedEvent("Received message msgConfirmTaxiTakeoffPath"));
    }
    public void msgNewDepartureStrip (Strip newDeparture) { 
    	log.add(new LoggedEvent("Received message msgNewDepartureStrip"));
    }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?