Skip to content
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

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Traffic lights #10

wants to merge 23 commits into from

Conversation

Inspiron17R
Copy link
Collaborator

Final improvements in Traffic Light classes

An7ar35 and others added 22 commits March 9, 2016 18:32
# 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
TrafficLightSet class: added two interior lists for two types of lights at a one junction.
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){
Copy link
Member

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;
Copy link
Member

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants