This program simulates a street with a traffic light that changes from red to green at set intervals. The program is completely autonomous and does not have a user interface.
During the course of this project, I gained valuable experience in:
- Checking for collisions
- Randomly generating "cars" when the desired number of cars has been reached
To compile the program with g++, use the following command:
g++ -o street_light main.cpp Road.cpp
To run the program, use the following command:
./street_light
This will compile and run the program, and the simulation will begin.