summaryrefslogtreecommitdiff
path: root/trafficlight.h
AgeCommit message (Collapse)AuthorFilesLines
2022-08-25Fixed a bug of the pedestrain traffic timer where it would restart fromOmar Magdy1-18/+21
5 to 1 again and Added comments for the whole project and added timers as a member of the Traffic struct to add more generlization of the
2022-08-24Added the functionality of timers And finished the projectOmar Magdy1-0/+12
2022-08-23Added Traffic_Handler function to apply DRY principleOmar Magdy1-0/+1
2022-08-23Removed prevPeriod from Traffic structOmar Magdy1-1/+0
2022-08-23Added switch_handler() function which allows the pedestrian to make theOmar Magdy1-1/+9
other traffic lights red and his green and at the same time when his light turns red the other continue where they left off + Moved all code to trafficlight.c and made the main less clutered
2022-08-23Removed color.h and color.cOmar Magdy1-1/+4
2022-08-23Added a Traffic struct and made the code more generic and easy toOmar Magdy1-1/+14
maintain
2022-08-23Added two timers and made them sync the 2 traffic lights as when oneOmar Magdy1-0/+12
traffic light is green the other is red and vice versa.