-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traffic lights #10
base: master
Are you sure you want to change the base?
Traffic lights #10
Conversation
# Conflicts: # simulator/src/main/java/kcl/teamIndexZero/traffic/simulator/data/links/TrafficLight.java # simulator/src/main/java/kcl/teamIndexZero/traffic/simulator/data/links/TrafficLightInSet.java
…he same junction.
TrafficLightSet class: added two interior lists for two types of lights at a one junction.
… Rule for the set
Conflicts: simulator/src/main/java/kcl/teamIndexZero/traffic/simulator/data/GraphTools.java simulator/src/main/java/kcl/teamIndexZero/traffic/simulator/data/descriptors/TrafficLightsInSetRule.java simulator/src/main/java/kcl/teamIndexZero/traffic/simulator/data/links/TrafficLight.java simulator/src/main/java/kcl/teamIndexZero/traffic/simulator/data/links/TrafficLightInSet.java simulator/src/main/java/kcl/teamIndexZero/traffic/simulator/data/trafficLight/TrafficLight.java simulator/src/main/java/kcl/teamIndexZero/traffic/simulator/data/trafficLight/TrafficLightController.java simulator/src/main/java/kcl/teamIndexZero/traffic/simulator/data/trafficLight/TrafficLightInSet.java simulator/src/main/java/kcl/teamIndexZero/traffic/simulator/data/trafficLight/TrafficLightSet.java simulator/src/test/java/kcl/teamIndexZero/traffic/simulator/data/GraphToolsTest.java Ctrl+Alt+L the traffic light code (indentation and spacing)
/** | ||
* Adds rule to the one traffic light set | ||
*/ | ||
public void addRule(TrafficLightsInSetRule rule){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So how are the TrafficLightInSet linked together so that they work synchronously?
@@ -10,7 +18,92 @@ | |||
|
|||
public class TrafficLightSet implements ISimulationAware { | |||
private ID id; | |||
public List<TrafficLightInSet> TrafficLightSetList; | |||
public List<TrafficLightInSet> InteriorListA; | |||
public List<TrafficLightInSet> InteriorListB; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 3 lists: TrafficLightSetList, InteriorListA, InteriorListB - You only need 2. One for one state and one for the opposite state.
…implementing enum type in traffic light set, fixing controller and corresponding tests.
Final improvements in Traffic Light classes