{"id":20525686,"url":"https://github.com/jsh32/particlesim","last_synced_at":"2025-08-15T18:45:04.164Z","repository":{"id":104105307,"uuid":"328343788","full_name":"JSH32/ParticleSim","owner":"JSH32","description":"Falling Sand / Cellular Automata. APCS Java assignment","archived":false,"fork":false,"pushed_at":"2021-01-11T16:01:09.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-06T01:32:13.052Z","etag":null,"topics":["cell","cellular-automata","falling-sand"],"latest_commit_sha":null,"homepage":"","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/JSH32.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-10T09:13:45.000Z","updated_at":"2021-01-11T16:01:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"1f9865c4-1bbe-4161-a51b-d3a06d58a472","html_url":"https://github.com/JSH32/ParticleSim","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/JSH32/ParticleSim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSH32%2FParticleSim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSH32%2FParticleSim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSH32%2FParticleSim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSH32%2FParticleSim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JSH32","download_url":"https://codeload.github.com/JSH32/ParticleSim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSH32%2FParticleSim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270616222,"owners_count":24617107,"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-08-15T02:00:12.559Z","response_time":110,"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":["cell","cellular-automata","falling-sand"],"created_at":"2024-11-15T23:08:48.272Z","updated_at":"2025-08-15T18:45:04.098Z","avatar_url":"https://github.com/JSH32.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Cellular automata / Falling sand\n\n![Screenshot](https://i.postimg.cc/dVSPcbyz/Zju9qRw.png)\n\n`ParticleSim.SandLab.main` is the entry point. This program is designed differently than the original architecture given in the document (I have been given permission to deviate).\n\n### Design\n-  `ParticleSim.Cell.getSurroundingCell`\nThis method looks for surrounding cells that either are any type on `Cell`'s inheritance tree, accomplished with generics. This is used in `ParticleSim.Cells.Fire` to look for surrounding `ParticleSim.FlammableCell`\n-  Each cell has a bitflag as does the program itself, this flag will be flipped when a cell is updated and the program's bitflag will be flipped once all updates are completed. This ensures a cell will not be updated twice after moving.\n-  The buttons no longer register with index numbers, instead you register classes directly and they get added as buttons with their class name, this is made possible with generics.\n-  Each pixel derives from Cell class and has its own update function that is called with each display update. Each pixel has a state such as `Wood`/`FlammableCell` having durability and a `damage` method.\n\n### Important notes\nI was told not to modify `ParticleSim.SandLab.run` but the time loop was broken and the slider was useless. I implemented my own TPS system for world updates per second. I changed `step` to `update` for personal preference. Due to architecture design I had to add more fields to `ParticleSim.SandLab`, this includes new buttons and bounds checking methods or circular brush sizes. The slider on the bottom that should be used for speed but didn't work is now a brush size slider. `ParticleSim.SandDisplay` was also modified to accomodate these changes.\n\n### Running\nI would have preffered to not need any build systems to make this function as it should but unfortunately with Java there is no such luck. This is bundled as a barebones maven project, as long as JDK and maven are downloaded/installed you should be able to run `run.bat` or `run.sh` in the root directory on your respective platform. A jar redistributable is attached in github releases if you do not want to manually compile it yourself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsh32%2Fparticlesim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsh32%2Fparticlesim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsh32%2Fparticlesim/lists"}