Exemplo n.º 1
0
        public KruispuntWachtrij(Direction[] directions, Direction from, IKruispunt kruispunt)
        {
            this.directions = directions;
            this.from = from;
            this.kruispunt = kruispunt;

            autos = new Queue<Auto>();
        }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public KruispuntType3(IKruispunt kruispunt, Simulator simulator)
 {
     this.simulator = simulator;
     this.ticks = this.simulator.Ticks;
     this.kruispunt = kruispunt;
 }
Exemplo n.º 5
0
        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>();
 }
Exemplo n.º 7
0
 public void removeAuto(Auto auto, IKruispunt afkomst)
 {
 }
Exemplo n.º 8
0
 public void addKruispunt(IKruispunt kruispunt, int pos)
 {
     kruispunten[pos] = new KruispuntWachtrij(kruispunt);
 }
Exemplo n.º 9
0
 public void addAuto(Auto auto, IKruispunt afkomst)
 {
 }