Regarding the path you have chosen to learn, I'm not sure that it is the best for you. You need to start with assessing realistically how good you are.
Please have a go at this challenge and this one. For the route you have taken I would expect a very good attempt at these. I know the answers are already up there, but I will be able to tell if you are crapping me about.
sorry but its like im always in a hurry when i get a chance to log on i just glimpsed at the lights thing never tried it out or nothing but what i would do at a glimpse is where you commented to implement is put a if statement that checks the status of the lights and if it is in state 3 to reset it to 0 and after am done with that if function thinking it wont run if the lights arnt in state three or the green lights if you will is to increment the stoplight's current state
as said just checked the core.cpp dont have an i.d.e or anything set up just came here to know which direction to head. if you think so maybe i should just go back to my c++ books then?