{"id":13621922,"url":"https://github.com/samtay/tetris","last_synced_at":"2025-05-15T03:08:59.529Z","repository":{"id":37458127,"uuid":"94166441","full_name":"samtay/tetris","owner":"samtay","description":"A terminal interface for Tetris","archived":false,"fork":false,"pushed_at":"2025-02-27T18:29:33.000Z","size":417,"stargazers_count":927,"open_issues_count":9,"forks_count":41,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-14T03:11:57.067Z","etag":null,"topics":["brick","game","haskell","terminal-game","tetris","tui","vty"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samtay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-06-13T03:48:49.000Z","updated_at":"2025-04-13T04:40:02.000Z","dependencies_parsed_at":"2022-08-08T20:16:10.422Z","dependency_job_id":"6664b677-b9af-4474-b25a-81d0a733b8b0","html_url":"https://github.com/samtay/tetris","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Ftetris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Ftetris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Ftetris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Ftetris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samtay","download_url":"https://codeload.github.com/samtay/tetris/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264771,"owners_count":22041794,"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":["brick","game","haskell","terminal-game","tetris","tui","vty"],"created_at":"2024-08-01T21:01:12.031Z","updated_at":"2025-05-15T03:08:54.494Z","avatar_url":"https://github.com/samtay.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"# tetris [![Build Status](https://github.com/samtay/tetris/actions/workflows/ci.yaml/badge.svg)](https://github.com/samtay/tetris/actions/workflows/ci.yaml)\n\nA terminal interface for Tetris\n\n![terminal-gif](./docs/img/play.gif)\n\n## installation\nInstallation on MacOS and Linux is outlined below. Windows support is questionable, but you can try to install from [source](#install-from-source).\n\n#### MacOS\nInstallation on a Mac is simple with Homebrew:\n```bash\nbrew install samtay/tui/tetris\n```\n#### Arch Linux\nArch Linux users can install from the [AUR](https://aur.archlinux.org/packages/tetris-terminal-git/), e.g.\n```bash\nyay -S tetris-terminal-git # or yaourt, etc.\n```\n#### Snapcraft\nThanks to **@thefenriswolf** this is available on most Linux distributions via [snapcraft](https://snapcraft.io/tetris-thefenriswolf):\n```bash\nsudo snap install tetris-thefenriswolf\nalias tetris=/snap/bin/tetris-thefenriswolf.tetris # add to .bashrc or .zshrc etc.\n```\n#### install from source\nFirst [get stack](https://docs.haskellstack.org/en/stable/README/#how-to-install). Then\n```bash\ngit clone https://github.com/samtay/tetris.git\ncd tetris\nstack install tetris\n```\n\n## usage\n\nThe default game is run by simply executing the `tetris` command.\nIf the unicode characters look a bit\nwonky in your terminal, you can also run\n```shell\ntetris --ascii-only         # uses [] as preview cell\n# or\ntetris --preview-chars 'XX' # uses custom characters as preview cell\n```\nIf you want to skip the level prompt, you can start the game immediately via\n```shell\ntetris --level n\n```\nLastly, to see the current high score, you can run `tetris --high-score`.\nAnd of course, see `tetris --help` for help.\n\n## tips\n\n#### troubleshooting\nPeople seem to have varying levels of success with the linux binary. Please note that it is compiled dynamically and hence should not be expected to work on most distros. If you have other problems, feel free to open an issue.\n\n#### roll your own\nIf you like games in your terminal and have an interest in functional programming, write your own! This code is built on top of [brick](https://github.com/jtdaugherty/brick) which makes building terminal user interfaces very accessible. I also have a [tutorial](https://samtay.github.io/posts/introduction-to-brick) that can help you get started.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamtay%2Ftetris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamtay%2Ftetris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamtay%2Ftetris/lists"}