{"id":15859019,"url":"https://github.com/liamg/gca","last_synced_at":"2025-04-01T19:46:32.354Z","repository":{"id":74990343,"uuid":"199912455","full_name":"liamg/gca","owner":"liamg","description":":microscope::game_die: Go Cellular Automata ","archived":false,"fork":false,"pushed_at":"2019-07-31T19:25:03.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-07T12:49:05.996Z","etag":null,"topics":["cellular-automata","cellular-automaton","procedural-generation"],"latest_commit_sha":null,"homepage":"","language":"Go","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/liamg.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":"2019-07-31T18:54:25.000Z","updated_at":"2023-09-08T17:56:25.000Z","dependencies_parsed_at":"2023-07-16T05:16:34.568Z","dependency_job_id":null,"html_url":"https://github.com/liamg/gca","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"b4be5df27027306d7c6467eafb50b79f08b92660"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fgca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fgca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fgca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liamg%2Fgca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liamg","download_url":"https://codeload.github.com/liamg/gca/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246705572,"owners_count":20820758,"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","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":["cellular-automata","cellular-automaton","procedural-generation"],"created_at":"2024-10-05T21:02:51.845Z","updated_at":"2025-04-01T19:46:32.331Z","avatar_url":"https://github.com/liamg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Cellular Automata\n\n[![GoDoc](https://godoc.org/github.com/liamg/gca?status.svg)](https://godoc.org/github.com/liamg/gca)\n\nA simple cellular automata package, useful for procedural generation.\n\nConfigurable, but has a helpful out of the box config that meets basic needs. Currently uses [Moore neighbourhoods](https://en.wikipedia.org/wiki/Moore_neighborhood).\n\n![Demo](demo.gif)\n\nYou can see the code used to generate this gif in [examples/gif/main.go](examples/gif/main.go).\n\n## Installation\n\nGCA supports go modules, but will also work fine without, just use:\n\n```\ngo get -u github.com/liamg/gca\n```\n\n## Usage Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/liamg/gca\"\n)\n\nfunc main() {\n\n\tgrid := gca.NewGrid(80, 24)\n\tgrid.Initialise()\n\tgrid.SetMinNeighboursToBirth(5)\n\tgrid.SetMinNeighboursToRemain(2)\n\tgrid.Run(3)\n\n\tw, h := grid.Size()\n\n\tfor y := 0; y \u003c h; y++ {\n\t\tfor x := 0; x \u003c w; x++ {\n\t\t\tif grid.Read(x, y) {\n\t\t\t\tfmt.Printf(\" \")\n\t\t\t} else {\n\t\t\t\tfmt.Printf(\"#\")\n\t\t\t}\n\t\t}\n\t\tfmt.Printf(\"\\n\")\n\t}\n\n}\n\n```\n\n...will output something like:\n\n```\n#       ##     ####      ###### #######     ###  ####    ##  #######         #  \n        #                 ####   ### ##           ##    #    ######         ##  \n#     ####           ##    ##   ###    ##              ###   ######         ##  \n#     ## ##      #   ###       ####     ##             ## #  ######         ##  \n#                #    ###     #####                       ## #####          ####\n                       ##     #####                       ##  ##             #  \n #          #                  ####                                             \n### ##    ####                  ##                               ###            \n#######   ###                                ###                 ###           #\n#   ##    ##      #      #                  ####                 ###           #\n                 ##     ##                 ###                  ###            #\n                 #   ## ### ###           ###                  ####            #\n       ##            ##  ######          #####                  ### ##         #\n       ###    ##     ########           #######                 #######        #\n       ## #  ####   ## #######    ##    ### ##       ##         ########  ##    \n#        # ## ###  ##   #######   ###   ##          ###         ########  ###   \n##      ###  ###  ##     #######   ##    ##         ##               ##    #    \n###    ###    #   ##        #####  ##           ## ##       ##                 #\n##    ####        ###        ####  ###          # ###                #         #\n#      # ##        ##          #   ####         ## #                ###        #\n#        ###        ###      ##     ####                            ###     ##  \n#       ####        ###     ###      ####                            ##    ###  \n#       ######     #####   ####     ######    ##     #               ##     #  #\n#   ## ########   #############    #######    ###   ###          ### ###  ######\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamg%2Fgca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliamg%2Fgca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliamg%2Fgca/lists"}