public void addAuto(Auto auto, Direction afkomst) { Direction[] choose = new Direction[3]; switch (afkomst) { case Direction.NORTH: choose[0] = Direction.SOUTH; choose[1] = Direction.EAST; choose[2] = Direction.WEST; break; case Direction.SOUTH: choose[0] = Direction.NORTH; choose[1] = Direction.EAST; choose[2] = Direction.WEST; break; case Direction.EAST: choose[0] = Direction.NORTH; choose[1] = Direction.SOUTH; choose[2] = Direction.WEST; break; case Direction.WEST: choose[0] = Direction.NORTH; choose[1] = Direction.SOUTH; choose[2] = Direction.EAST; break; } auto.kiesRichting(choose); getWachtrij(afkomst, auto.Richting).Add(auto); }
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 void Remove(Auto auto) { autos.Remove(auto); }
public void Add(Auto auto) { autos.Add(auto); }
public void removeAuto(Auto auto, IKruispunt afkomst) { }
public void addAuto(Auto auto, IKruispunt afkomst) { }
public void Add(Auto auto) { autos.Enqueue(auto); }