Example #1
0
        public Crossroad()
        {
            LeftToUpTrafficLight    = new TrafficLight(TrafficLightState.Red);
            LeftToRightTrafficLight = new TrafficLight(TrafficLightState.Red);
            LeftToDownTrafficLight  = new TrafficLight(TrafficLightState.Red);
            UpToLeftTrafficLight    = new TrafficLight(TrafficLightState.Red);
            UpToDownTrafficLight    = new TrafficLight(TrafficLightState.Red);
            UpToRightTrafficLight   = new TrafficLight(TrafficLightState.Red);
            RightToUpTrafficLight   = new TrafficLight(TrafficLightState.Red);
            RightToLeftTrafficLight = new TrafficLight(TrafficLightState.Red);
            RightToDownTrafficLight = new TrafficLight(TrafficLightState.Red);
            DownToLeftTrafficLight  = new TrafficLight(TrafficLightState.Red);
            DownToUpTrafficLight    = new TrafficLight(TrafficLightState.Red);
            DownToRightTrafficLight = new TrafficLight(TrafficLightState.Red);

            LeftToUpTrafficData    = new TrafficData();
            LeftToRightTrafficData = new TrafficData();
            LeftToDownTrafficData  = new TrafficData();
            UpToLeftTrafficData    = new TrafficData();
            UpToDownTrafficData    = new TrafficData();
            UpToRightTrafficData   = new TrafficData();
            RightToUpTrafficData   = new TrafficData();
            RightToLeftTrafficData = new TrafficData();
            RightToDownTrafficData = new TrafficData();
            DownToLeftTrafficData  = new TrafficData();
            DownToUpTrafficData    = new TrafficData();
            DownToRightTrafficData = new TrafficData();

            //CrossroadController = new CrossroadControllerReinforcement(this);
            CrossroadController = new CrossroadControllerStaticTimer(this);
        }
Example #2
0
        public Crossroad(int row, int column)
        {
            Row    = row;
            Column = column;

            LeftToUpTrafficLight    = new TrafficLight(TrafficLightState.Red);
            LeftToRightTrafficLight = new TrafficLight(TrafficLightState.Red);
            LeftToDownTrafficLight  = new TrafficLight(TrafficLightState.Red);
            UpToLeftTrafficLight    = new TrafficLight(TrafficLightState.Red);
            UpToDownTrafficLight    = new TrafficLight(TrafficLightState.Red);
            UpToRightTrafficLight   = new TrafficLight(TrafficLightState.Red);
            RightToUpTrafficLight   = new TrafficLight(TrafficLightState.Red);
            RightToLeftTrafficLight = new TrafficLight(TrafficLightState.Red);
            RightToDownTrafficLight = new TrafficLight(TrafficLightState.Red);
            DownToLeftTrafficLight  = new TrafficLight(TrafficLightState.Red);
            DownToUpTrafficLight    = new TrafficLight(TrafficLightState.Red);
            DownToRightTrafficLight = new TrafficLight(TrafficLightState.Red);

            LeftToUpTrafficData    = new TrafficData();
            LeftToRightTrafficData = new TrafficData();
            LeftToDownTrafficData  = new TrafficData();
            UpToLeftTrafficData    = new TrafficData();
            UpToDownTrafficData    = new TrafficData();
            UpToRightTrafficData   = new TrafficData();
            RightToUpTrafficData   = new TrafficData();
            RightToLeftTrafficData = new TrafficData();
            RightToDownTrafficData = new TrafficData();
            DownToLeftTrafficData  = new TrafficData();
            DownToUpTrafficData    = new TrafficData();
            DownToRightTrafficData = new TrafficData();

            //rossroadController = new CrossroadControllerReinforcement(this);
            CrossroadController = new CrossroadControllerStaticTimer(this);
        }