Traffic light simulator using thread and enumeration

http://ideone.com/IBqzkg