{"id":23733737,"url":"https://github.com/lucamug/functional-pacman","last_synced_at":"2025-12-30T04:01:29.902Z","repository":{"id":264433961,"uuid":"893363996","full_name":"lucamug/functional-pacman","owner":"lucamug","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-28T22:48:44.000Z","size":834,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T23:23:25.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://lucamug.github.io/functional-pacman/","language":"Elm","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/lucamug.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":"2024-11-24T08:39:54.000Z","updated_at":"2024-12-28T22:48:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe326e1c-8466-4f20-a72e-83f2b7898426","html_url":"https://github.com/lucamug/functional-pacman","commit_stats":null,"previous_names":["lucamug/pacman","lucamug/functional-pacman"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucamug%2Ffunctional-pacman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucamug%2Ffunctional-pacman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucamug%2Ffunctional-pacman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucamug%2Ffunctional-pacman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucamug","download_url":"https://codeload.github.com/lucamug/functional-pacman/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231944889,"owners_count":18449789,"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":[],"created_at":"2024-12-31T05:02:02.969Z","updated_at":"2025-12-30T04:01:24.863Z","avatar_url":"https://github.com/lucamug.png","language":"Elm","funding_links":[],"categories":["Elm"],"sub_categories":[],"readme":"# Functional Pac-Man\n\n![Animation](/docs/pacman.gif?raw=true \"Animation\")\n\nAn interpretation of the [Pac-Man](https://en.wikipedia.org/wiki/Pac-Man) game, written in approximately [1K lines](https://github.com/lucamug/functional-pacman/blob/main/src/Game.elm) of purely functional code. It runs both in the browser and in the terminal.\n\nThe game is written in the [Elm language](https://elm-lang.org/) and the [Gren language](https://gren-lang.org/), using the [TUI library](https://packages.gren-lang.org/package/blaix/gren-tui/version/3.0.2/overview) for the version that runs in the terminal.\n\n## To run the game in the browser\n\nGo to: [https://lucamug.github.io/functional-pacman/](https://lucamug.github.io/functional-pacman/)\n\n## To run the game in the terminal\n\nExecute:\n\n```shell\ngit clone https://github.com/lucamug/functional-pacman/\ncd functional-pacman\nnode docs/gren-pacman\n```\n\nThe program requires Node.js v20 or later.\n\n## Debug modality\n\nBy pressing [B], you can display additional internal information on the side of the playing area.\n\n![Screen 2](/docs/screen02.png?raw=true \"Screen 2\")\n\n## Development\n\nClone the repository:\n\n```shell\ngit clone https://github.com/lucamug/functional-pacman/\ncd functional-pacman\nnpm install\n```\n\nSeveral commands are available in the `cmd` folder.\n\n### To work on the Elm code\n\n```shell\ncmd/start-elm\n```\n\nThen point your browser to [http://localhost:8003/](http://localhost:8003/).\n\nThe main file is [Game.elm](https://github.com/lucamug/functional-pacman/blob/main/src/Game.elm). This code is the same as Game.gren. They are kept in sync via a symlink. After editing any Elm file, the game in the browser will automatically hot-reload.\n\n### To work on the Gren code\n\n```shell\ncmd/start-gren\n```\n\nThis will compile and run the code in the terminal. [ESC] or [CTRL + C] to exit.\n\nTo format the Gren code\n\n```shell\ncmd/format-gren\n```\n\n### To release a new version\n\nRun\n\n```shell\ncmd/build\n```\n\nThis will update the file in `/docs/`. These files can be published via Github from \"Settings \u003e Pages \u003e Deploy from a branch \u003e main /docs\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucamug%2Ffunctional-pacman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucamug%2Ffunctional-pacman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucamug%2Ffunctional-pacman/lists"}