{"id":16686039,"url":"https://github.com/mosheberman/trafficlight","last_synced_at":"2025-09-11T08:36:48.821Z","repository":{"id":139431105,"uuid":"10236824","full_name":"MosheBerman/TrafficLight","owner":"MosheBerman","description":"TrafficLight is a Java homework assigned in one of my classes this semester, at Brooklyn College. (Spring 2013)","archived":false,"fork":false,"pushed_at":"2013-05-23T13:46:10.000Z","size":224,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T15:17:37.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MosheBerman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-23T05:53:53.000Z","updated_at":"2013-12-01T11:04:08.000Z","dependencies_parsed_at":"2023-03-13T10:48:40.541Z","dependency_job_id":null,"html_url":"https://github.com/MosheBerman/TrafficLight","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MosheBerman/TrafficLight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MosheBerman%2FTrafficLight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MosheBerman%2FTrafficLight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MosheBerman%2FTrafficLight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MosheBerman%2FTrafficLight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MosheBerman","download_url":"https://codeload.github.com/MosheBerman/TrafficLight/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MosheBerman%2FTrafficLight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274602341,"owners_count":25315199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T15:04:23.824Z","updated_at":"2025-09-11T08:36:48.786Z","avatar_url":"https://github.com/MosheBerman.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"TrafficLight\n============\n\nTrafficLight is a Java homework assigned in one of my classes this semester, at Brooklyn College. (Spring 2013)\n\n![Green Light, Button Disabled](./screenshots/green.png)\n![Green Light, Button Enabled](./screenshots/green-button.png)\n![Yellow Light](./screenshots/yellow.png)\n![Red Light](./screenshots/red.png)\n\nWhat It Does:\n---\nThe StopLight class simulates a traffic light at an intersection. The light remains green for 50 seconds, turns yellow for 10 seconds, and then red for 60 seconds. \n\nThe Cross Button:\n---\nThe Cross button becomes enabled when the light is green, but only ten seconds after the light has switched from red to green. Clicking on it accelerates the light, by immediately cycling to yellow. This way, it becomes safe to cross sooner, because the yellow light becomes red after ten seconds.\n\nThreading:\n---\nStopLight.java utilizes a Thread subclass to drive the timer loop of the light cycle. It calls a synchronized method on the StopLight which should cycle the light. It won't if the button is in the middle of causing a change, though.\n\nLicense:\n---\nFeel free to inspect my coding style, but don't redistribute it.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmosheberman%2Ftrafficlight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmosheberman%2Ftrafficlight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmosheberman%2Ftrafficlight/lists"}