public KruispuntWachtrij(Direction[] directions, Direction from, IKruispunt kruispunt) { this.directions = directions; this.from = from; this.kruispunt = kruispunt; autos = new Queue<Auto>(); }
public void addKruispunt(IKruispunt kruispunt, Direction direction) { switch (direction) { case Direction.EAST: east = kruispunt; break; case Direction.WEST: west = kruispunt; break; case Direction.SOUTH: south = kruispunt; break; } }
public void addAuto(Auto auto, IKruispunt afkomst) { Direction direction; if (afkomst == north) { direction = Direction.NORTH; } else if (afkomst == south) { direction = Direction.SOUTH; } else if (afkomst == east) { direction = Direction.EAST; } else { direction = Direction.WEST; } addAuto(auto, direction); }
public KruispuntType3(IKruispunt kruispunt, Simulator simulator) { this.simulator = simulator; this.ticks = this.simulator.Ticks; this.kruispunt = kruispunt; }
private KruispuntForm loadKruispunt(IKruispunt load) { KruispuntForm kruispunt; if (load is Type1) { load = load as Type1; kruispunt = new TKP1(load); } else if (load is Type2) { load = load as Type2; kruispunt = new TKP2(load); } else if (load is Type3) { load = load as Type3; kruispunt = new TKP3(load); } else if (load is Type4) { load = load as Type4; kruispunt = new TKP4(load); } else { return null; } return kruispunt; }
public KruispuntWachtrij(IKruispunt kruispunt) { this.kruispunt = kruispunt; autos = new List<Auto>(); }
public void removeAuto(Auto auto, IKruispunt afkomst) { }
public void addKruispunt(IKruispunt kruispunt, int pos) { kruispunten[pos] = new KruispuntWachtrij(kruispunt); }
public void addAuto(Auto auto, IKruispunt afkomst) { }