Skip to content

My implementation of the first programming task for AGH Racing recruitment process

Notifications You must be signed in to change notification settings

paulinagacek/Traffic-lights-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Traffic lights simulator 🚦

This programme simulates behavior of traffic lights by use of state machine.

Possible states:

  • <State 1> Cars: green, pedestrians: red
  • <State 2> Cars: yellow, pedestrians: red
  • <State 3> Cars: red, pedestrians: green

Possible transitions:

  • <State 1> ➡️ <State 2> after 10 seconds
  • <State 2> ➡️ <State 3> after 20 seconds or after pushing button*
  • <State 3> ➡️ <State 1> after 2 seconds

⚠️ button pushed during period when pedestrians have green light does not count

pushing button is simulated by not empty input from keyboard

About

My implementation of the first programming task for AGH Racing recruitment process

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published