{"id":13408723,"url":"https://github.com/mgrojo/play_2048","last_synced_at":"2025-07-26T14:37:13.231Z","repository":{"id":41938811,"uuid":"392769745","full_name":"mgrojo/play_2048","owner":"mgrojo","description":"2048 game: merge equal tiles until you add up to 2048","archived":false,"fork":false,"pushed_at":"2023-11-19T16:44:26.000Z","size":1170,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-02T23:58:29.375Z","etag":null,"topics":["2048-game","ada","puzzle","sfml"],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgrojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.md","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":"2021-08-04T17:10:20.000Z","updated_at":"2025-04-25T13:54:24.000Z","dependencies_parsed_at":"2023-11-19T17:43:52.025Z","dependency_job_id":null,"html_url":"https://github.com/mgrojo/play_2048","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mgrojo/play_2048","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Fplay_2048","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Fplay_2048/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Fplay_2048/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Fplay_2048/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgrojo","download_url":"https://codeload.github.com/mgrojo/play_2048/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Fplay_2048/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267179399,"owners_count":24048329,"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-07-26T02:00:08.937Z","response_time":62,"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":["2048-game","ada","puzzle","sfml"],"created_at":"2024-07-30T20:00:54.816Z","updated_at":"2025-07-26T14:37:13.183Z","avatar_url":"https://github.com/mgrojo.png","language":"Ada","funding_links":[],"categories":["Games"],"sub_categories":["Continuous Integration"],"readme":"[![Build](https://github.com/mgrojo/play_2048/actions/workflows/main.yml/badge.svg)](https://github.com/mgrojo/play_2048/actions/workflows/main.yml)\n[![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/play_2048.json)](https://alire.ada.dev/crates/play_2048.html)\n[![Alire CI/CD](https://img.shields.io/endpoint?url=https://alire-crate-ci.ada.dev/badges/play_2048.json)](https://alire-crate-ci.ada.dev/crates/play_2048.html)\n[![Download][download-img]][download]\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/ada-lang/Lobby)\n[![Mentioned in Awesome Ada](https://awesome.re/mentioned-badge.svg)](https://github.com/ohenley/awesome-ada)\n![Screenshot of Play 2048!](/images/screenshot_linux_4x4.png)\n\n\nThis is yet another implementation of the [2048\ngame](https://github.com/gabrielecirulli/2048), implemented in Ada\nusing [ASFML](https://mgrojo.github.io/ASFML/) for graphics and\n[ada-toml](https://github.com/pmderodat/ada-toml) for saving state.\n\nIt has been tested under Windows 10 and Ubuntu Linux 20.04.\n\n# Features\n\n- Different [themes](/themes/) can be switched while playing. Five themes are\nincluded, but the user can add up to nine themes, following the same\nstructure.\n- Best score and best time\n- Fullscreen\n- Saving of the state\n- Undo last move\n- Three board sizes:\n  - Small (3x3): difficult, beat your score!\n  - Default (4x4): normal, you can do it!\n  - Easy (5x5): easy, beat your best time!\n\n# How to build\n\n- Install [Alire](https://alire.ada.dev/)\n- Build using `alr build`. All the dependencies are installed and managed by Alire.\n- Run using `alr run` (mandatory in Windows so it finds installed libraries) or\n  directly from the working directory: `./play_2048` (Linux only).\n\n# How to install\n\nThe game can be installed using Alire 2.0 with this command:\n```\nalr install\n```\nRefer to Alire documentation on how to add the Alire default installation to the PATH variable\nor how  to change the default installation prefix.\n\nIf Alire 2.0 is not available, you can still install the application using something like this:\n```\nsudo make PREFIX=/opt/play_2048 install\n```\n\nIf you're interested in building the AppImage file:\n```\nmake AppImage\n```\n\n# How to play\n\nUse arrow keys to move tiles. When two adjacent tiles with the same number are merged, their numbers\nadd up. Keep merging tiles until you get to 2048. If the board is full and there is no possible move\n(no adjacent tiles with the same number), you lose.\n\nTo change the board size, export the enviroment variable\nPLAY_2048_SIZE to the number of cells per size, for example, in\nLinux/Bash:\n\n```bash\nexport PLAY_2048_SIZE=3\n```\nAfter a change in the board size, the board state will not be restored.\n\nKeys:\n- \u003ckbd\u003eR\u003c/kbd\u003e - restart game\n- \u003ckbd\u003eQ\u003c/kbd\u003e - quit game\n- Arrow keys - move tiles\n- \u003ckbd\u003eU\u003c/kbd\u003e - undo last move\n- \u003ckbd\u003eF11\u003c/kbd\u003e - toggle fullscreen mode\n- \u003ckbd\u003eTab\u003c/kbd\u003e - switch theme\n\n# Attribution\n\nThe initial implementation of the game logic was taken from [Rosetta\nCode](https://rosettacode.org/wiki/2048), although it has been mostly\nrewritten.\n\nFonts used in the themes: Noto Serif (SIL Open Font License) for Theme\n5 and DeJa Vu Sans (MIT License) for the rest.\n\n\n  [download-img]: https://img.shields.io/github/downloads/mgrojo/play_2048/total.svg\n  [download]: https://github.com/mgrojo/play_2048/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrojo%2Fplay_2048","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgrojo%2Fplay_2048","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrojo%2Fplay_2048/lists"}