{"id":17042600,"url":"https://github.com/carstenkoenig/minesweeper-ps","last_synced_at":"2025-03-23T01:40:49.864Z","repository":{"id":42724388,"uuid":"285016168","full_name":"CarstenKoenig/minesweeper-ps","owner":"CarstenKoenig","description":"Minesweeper clone in Purescript using Halogen-Hooks","archived":false,"fork":false,"pushed_at":"2023-01-07T03:42:33.000Z","size":199,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T04:46:53.323Z","etag":null,"topics":["demo-app","halogen","halogen-hooks","purescript"],"latest_commit_sha":null,"homepage":"","language":"PureScript","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/CarstenKoenig.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":"2020-08-04T15:09:54.000Z","updated_at":"2022-12-20T12:31:22.000Z","dependencies_parsed_at":"2023-02-06T11:15:52.981Z","dependency_job_id":null,"html_url":"https://github.com/CarstenKoenig/minesweeper-ps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarstenKoenig%2Fminesweeper-ps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarstenKoenig%2Fminesweeper-ps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarstenKoenig%2Fminesweeper-ps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarstenKoenig%2Fminesweeper-ps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarstenKoenig","download_url":"https://codeload.github.com/CarstenKoenig/minesweeper-ps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245044494,"owners_count":20551898,"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":["demo-app","halogen","halogen-hooks","purescript"],"created_at":"2024-10-14T09:17:54.181Z","updated_at":"2025-03-23T01:40:49.840Z","avatar_url":"https://github.com/CarstenKoenig.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minesweeper-ps\n\nthe well known classic game implemented in [*PureScript*](https://www.purescript.org/)\nusing [Halogen-Hooks](https://github.com/thomashoneyman/purescript-halogen-hooks).\n\n---\n\nThe goal of this project was for me to learn more about **halogen-hooks**\nand how to use them.\n\nAlong the way I used a few thing I had not much experience with:\n\n- SCSS, CSS-Grid\n- using a [EventSource](https://pursuit.purescript.org/packages/purescript-halogen/5.0.0/docs/Halogen.Query.EventSource#t:EventSource)\nwith **halogen** (in this case a very simple wrapper for a `setInterval`/timer)\n- `preventDefault` on context-menues\n\nI'm not sure if this is all really *idiomatic* so please let me know if any\nof this here can be simplified or should be done differently.\n\nOverall the expereince with **hooks** was very pleasant and after I found\nthe hint to [`effectEventSource`](https://pursuit.purescript.org/packages/purescript-halogen/5.0.0/docs/Halogen.Query.EventSource#t:EventSource)\nthe *timer*-component was quite straightforward too.\n\n---\n\nYou might also find these **Halogen** conecpts used here interesting:\n\n- parent-component querying it's child (see how the [Game-component enables the Timer-component](./src/Components/Game.purs))\n- many children/slots of the same type (see how the [Cell-compoenents gets nested in the Game-component](./src/Components/Game.purs))\n- children passing *Output* to their parants (see how the [Cell-compoenents notifies the Game-component on click-events](./src/Components/Game.purs))\n- using `Effect`s (basically just add constaints for `MonadEffect` and `liftEffect`)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarstenkoenig%2Fminesweeper-ps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarstenkoenig%2Fminesweeper-ps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarstenkoenig%2Fminesweeper-ps/lists"}