{"id":18118203,"url":"https://github.com/chemaclass/phel-snake","last_synced_at":"2025-10-09T03:08:46.428Z","repository":{"id":37587066,"uuid":"501717723","full_name":"Chemaclass/phel-snake","owner":"Chemaclass","description":"The snake game using the CLI terminal written in phel.","archived":false,"fork":false,"pushed_at":"2025-06-01T02:05:25.000Z","size":2206,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-27T05:50:22.710Z","etag":null,"topics":["functional-programming","phel","phel-lang","php"],"latest_commit_sha":null,"homepage":"https://phel-lang.org/","language":"PHP","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/Chemaclass.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,"zenodo":null}},"created_at":"2022-06-09T15:52:32.000Z","updated_at":"2025-06-01T02:05:28.000Z","dependencies_parsed_at":"2024-06-22T16:40:55.873Z","dependency_job_id":"82dc26f1-130e-4ba9-9ec4-fa29436707d2","html_url":"https://github.com/Chemaclass/phel-snake","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"phel-lang/phel-scaffolding","purl":"pkg:github/Chemaclass/phel-snake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chemaclass%2Fphel-snake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chemaclass%2Fphel-snake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chemaclass%2Fphel-snake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chemaclass%2Fphel-snake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chemaclass","download_url":"https://codeload.github.com/Chemaclass/phel-snake/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chemaclass%2Fphel-snake/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000773,"owners_count":26082911,"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-10-09T02:00:07.460Z","response_time":59,"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":["functional-programming","phel","phel-lang","php"],"created_at":"2024-11-01T05:09:29.405Z","updated_at":"2025-10-09T03:08:46.406Z","avatar_url":"https://github.com/Chemaclass.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phel Snake\n\nA cli-game written in [Phel](https://phel-lang.org/).\n\n## Two versions in one repository\n\nThis repository contains a [full-version](src/full-version/game.phel) and a [simplified version](src/simple-version/game.phel) of the snake game. \n\n\u003e I thought it might be useful to create a simplified version as introduction to the fundamentals of the language and the game itself.\n\n- In the simplified version, you will find just the snake inside the board.\n- In the full version, the snake will increase the speed as it reaches to goals.\n\n## How to play\n\n### Instructions\n\nUse the arrow keys to move the snake: `left-right-top-down`.\nThe game ends when the snake touches any border of the board.\n\n#### In the full version\n\n- You can use the `space-key` to accelerate a few cells the snake in the current direction.\n\n- The snake will automatically increase the speed after each goal reached, unless you enable the \"god mode\" (using the argument `god-mode`).\n\n### Setup\n\n#### Using Docker\n\n1. Clone this repo\n2. Build the image and run the container: `docker-compose up --build -d`\n3. Run the game: `docker exec -it phel_snake ./tools/composer play`\n\n#### Locally (no Docker)\n\n1. Ensure you have PHP `\u003e=8.2`\n   1. Some help about how to install multiple PHP versions locally on [linux](https://github.com/phpbrew/phpbrew) and [Mac](https://github.com/shivammathur/homebrew-php)\n2. Clone this repo\n3. Install the dependencies: `./tools/composer install`\n4. Run the game: `./tools/composer play`\n\n---\n\nAlternatively, you can run the game using the `phel run` command\nYou can define some optional arguments\n- width={N} -\u003e width of the board\n- height={N} -\u003e height of the board\n- god-mode -\u003e the snake won't increment the speed as it eats apples\n- debug -\u003e you can see internal stats of the game\n- simple -\u003e start the simplified game\n\n```bash\nvendor/bin/phel run src/main.phel width=40 height=15 god-mode debug\n```\n\n## Demo\n\n![](img/demo-snake.webp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchemaclass%2Fphel-snake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchemaclass%2Fphel-snake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchemaclass%2Fphel-snake/lists"}