{"id":23577292,"url":"https://github.com/wooster0/yayagram","last_synced_at":"2025-05-05T23:14:16.699Z","repository":{"id":45112610,"uuid":"370326512","full_name":"wooster0/yayagram","owner":"wooster0","description":"Play nonograms/picross in your terminal","archived":false,"fork":false,"pushed_at":"2023-08-10T11:31:37.000Z","size":448,"stargazers_count":40,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-05T23:14:11.211Z","etag":null,"topics":["game","nonogram","picross","puzzle","rust","terminal"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/yayagram","language":"Rust","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/wooster0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2021-05-24T11:20:36.000Z","updated_at":"2024-12-28T02:06:25.000Z","dependencies_parsed_at":"2023-07-23T17:52:42.763Z","dependency_job_id":null,"html_url":"https://github.com/wooster0/yayagram","commit_stats":null,"previous_names":["wooster0/yayagram","r00ster91/yayagram"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooster0%2Fyayagram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooster0%2Fyayagram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooster0%2Fyayagram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wooster0%2Fyayagram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wooster0","download_url":"https://codeload.github.com/wooster0/yayagram/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590632,"owners_count":21772940,"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":["game","nonogram","picross","puzzle","rust","terminal"],"created_at":"2024-12-26T22:28:37.336Z","updated_at":"2025-05-05T23:14:16.673Z","avatar_url":"https://github.com/wooster0.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yayagram - Play nonograms/picross in your terminal\n\n**yayagram** is a puzzle game in which you fill out a grid with cells based on logic and number clues in your terminal using the mouse.\n\nThe game goes by many names: nonogram, picross, paint by numbers, griddlers, pic-a-pix, hanjie, and others.\n\n![Showcase](showcase.png)\n\n*A randomized grid where white signifies a filled cell and red signifies a crossed out cell.*\n\nSee [this example](#Example) to find out how to play.\n\nPlaying it is as easy as:\n\n```console\ncargo install yayagram\nyayagram\n```\n\nBinaries are also provided in the [Releases](https://github.com/r00ster91/yayagram/releases).\n\n## Demo\n\nhttps://github.com/wooster0/yayagram/assets/35064754/26d179a2-7719-4bbb-88c4-d27f1688624c\n\n## Features\n\n* Runs in the terminal and is playable with the mouse!\n* Cross-platform: runs on Linux and macOS.\n* Helpful additional features and tools like undo, redo, flood fill, clear, and more.\n* Random grids.\n* Custom grids: [create your own grids](#Editor) for others to play.\n* A new kind of cell: [maybed](#Maybed).\n* Very well suited for [big grids](#Big-grids).\n* Intuitive to play.\n\n## Controls\n\nThe game is primarily played with mouse and keyboard but can also be played exclusively with the keyboard.\nYou don't need to memorize the following controls. The most important controls are displayed ingame.\n\n- Mouse movement, arrow keys, or \u003ckbd\u003eH\u003c/kbd\u003e\u003ckbd\u003eJ\u003c/kbd\u003e\u003ckbd\u003eK\u003c/kbd\u003e\u003ckbd\u003eL\u003c/kbd\u003e: select a cell.\n- Left-click or \u003ckbd\u003eQ\u003c/kbd\u003e: place a cell.\n- Middle-click or \u003ckbd\u003eW\u003c/kbd\u003e: [maybe a cell](#Maybed).\n- Right-click or \u003ckbd\u003eE\u003c/kbd\u003e: cross out a cell.\n- \u003ckbd\u003eC\u003c/kbd\u003e: clear the grid.\n- \u003ckbd\u003eA\u003c/kbd\u003e: undo cell placements or a grid clear.\n- \u003ckbd\u003eD\u003c/kbd\u003e: redo cell placements or a grid clear.\n- \u003ckbd\u003eF\u003c/kbd\u003e: flood-fill multiple cells.\n- \u003ckbd\u003eX\u003c/kbd\u003e: set [measurement point](#Measurement-tool).\n- \u003ckbd\u003eTab\u003c/kbd\u003e: toggle the [editor](#Editor).\n- \u003ckbd\u003eS\u003c/kbd\u003e: save the [edited](#Editor) grid as a file locally.\n- \u003ckbd\u003eEnter\u003c/kbd\u003e: load local `.yaya` grid files with drag \u0026 drop onto the window.\n- \u003ckbd\u003eEsc\u003c/kbd\u003e: exit.\n\nFor anyone that prefers to use the vi keys, you may be interested in [@Maugrift](https://github.com/Maugrift)'s wonderful [**fork**](https://github.com/Maugrift/yayagram) which features an alternate control scheme!\n\n## Editor\n\nPress \u003ckbd\u003eTab\u003c/kbd\u003e to toggle the editor and start placing the cells for your grid.\nYou can make use of all cell kinds.\nTo export your grid, press \u003ckbd\u003eS\u003c/kbd\u003e to save the grid as a new local `.yaya` grid file while in editor mode.\nNote that in the same session it will always write the grid to the same file again unless renamed.\n\n## Loading grid files\n\n* You can press \u003ckbd\u003eEnter\u003c/kbd\u003e ingame to load a `.yaya` grid file with drag \u0026 drop onto the window. Many but not all terminals support this.\n* On Linux and macOS the `.yaya` file can be passed via the [command line](#Command-line-arguments).\n\n## img2yaya\n\nAs an alternative to the editor you can generate `.yaya` grids using [@AaronErhardt](https://github.com/AaronErhardt)'s amazing [**img2yaya**](https://github.com/AaronErhardt/img2yaya) to convert images to playable `.yaya` files!\n\n## Command line arguments\n\nThe program takes a single number for a squared grid size, two numbers for width and height, or the filename of a `.yaya` grid file to load a custom user-made grid.\n\n```shell\nyayagram # a random 5x5 grid\nyayagram 10 # a random 10x10 grid\nyayagram 5 15 # a random 5x15 grid\nyayagram example.yaya # a custom grid\n```\n\n`--help`, `-h` and `--version`, `-V` are also supported.\n\n## Measurement tool\n\nParticularly on bigger grids it can sometimes become hard to count all the cells.\nFor this you can use the measurement tool. Simply press \u003ckbd\u003eX\u003c/kbd\u003e to set your first point and then \u003ckbd\u003eX\u003c/kbd\u003e again to set your second point.\nYou will then be able to see the distance between those two points with the measured cells that appear.\nMeasured cells never overwrite cell kinds other than empty cells and its own.\n\nIf you save a grid that contains measured cells, their distance indices won't be saved\nand the measured cells will only appear as green when that grid is loaded.\n\n## Maybed\n\nThe blue \"maybed\" cell kind can be placed on the grid with middle-click and is supposed to make \"what if?\" reasoning and trying out things easier,\nas an alternative to using crossed out or filled cells which may be confusing.\n\n## Big grids\n\nyayagram is very well suited for big grids, up to size 99x99. Here are the reasons:\n\n* The [measurement tool](#Measurement-tool) makes counting many cells far less error-prone and a lot easier.\n* There is a fill tool that easily lets you flood-fill multiple cells at once.\n* Cells surrounding the pointer are highlighted so that you don't lose track of the cell row you are focusing on.\n* The grid is shown in smaller form on the top left, making it easier to see the whole picture.\n\n## Other Tips\n\n- Try to avoid guesssing and play it safe! Guessing can come back later to bite you. Guessing is `unsafe`.\n- Don't forget to cross out cells that you are sure won't be filled.\n  This helps immensely at ruling out possibilities.\n- If you want a new random grid, drag the litle resize icon in the grid's bottom right, next to the progress bar, to the size you want.\n- Be careful about accidentally pasting in your clipboard data. Some terminals paste with the press of a mouse button.\n  If the data contains `'c'` for instance, the grid will be cleared because it's recognized as the \u003ckbd\u003eC\u003c/kbd\u003e key being pressed.\n  This clear can be undone using the \u003ckbd\u003eA\u003c/kbd\u003e key of course, but it may be confusing.\n  The same applies to items dropped onto the window. Press \u003ckbd\u003eEnter\u003c/kbd\u003e before [loading grid files](#Loading-grid-files).\n\n## Example\n\nHere's a simple example to help you grasp the game.\n\n|       | 2 | 3 | 2 |\n|-------|---|---|---|\n| **2** |   |   |   |\n| **3** |   |   |   |\n| **2** |   |   |   |\n\nThis is our grid where we need to fill out these 9 empty fields with the help of the 6 clue numbers on the top and on the left.\nFirst, let's take a look at the 3 clues on the very top: the first one is **2**.\nIt tells us that exactly 2 cells in a row of the 3 cells below it are filled.\nThrough logic we can determine that this means that at least the middle cell is definitely filled:\n\n|       | 2 | 3 | 2 |\n|-------|---|---|---|\n| **2** |   |   |   |\n| **3** | ◯ |   |   |\n| **2** |   |   |   |\n\nLet's look at what the clue next to it to the right tells us (**3**).\nThis clue means that there is exactly 3 cells in a row filled below.\nBecause we only have 3 cells here (because it's a 3x3 grid), we can simply fill out all of those 3 cells safely:\n\n|       | 2 | 3 | 2 |\n|-------|---|---|---|\n| **2** |   | ◯ |   |\n| **3** | ◯ | ◯ |   |\n| **2** |   | ◯ |   |\n\nNext clue on the top: **2**. Again, through logic we can determine that at least the cell in the middle is definitely filled:\n\n|       | 2 | 3 | 2 |\n|-------|---|---|---|\n| **2** |   | ◯ |   |\n| **3** | ◯ | ◯ | ◯ |\n| **2** |   | ◯ |   |\n\nNow let's continue with the clues on the left, starting with the top one: **2**.\nHere it's the same, there is definitely at least the middle cell filled,\nwhich is already the case so we can simply move on with the clue below it: **3**.\nThe row is already filled out so let's move on to the next one: **2**.\nAgain, nothing to do.\nIt turns out that we have a pretty rare case here where **two solutions are correct**:\n\n|       | 2 | 3 | 2 |\n|-------|---|---|---|\n| **2** | ◯ | ◯ |   |\n| **3** | ◯ | ◯ | ◯ |\n| **2** |   | ◯ | ◯ |\n\nor\n\n|       | 2 | 3 | 2 |\n|-------|---|---|---|\n| **2** |   | ◯ | ◯ |\n| **3** | ◯ | ◯ | ◯ |\n| **2** | ◯ | ◯ |   |\n\nBoth solutions fulfill the requirements.\n\nI hope this helped you grasp the game a little bit.\nNow you can try to apply some of what you learned on a small grid like 3x3 or 5x5 by simply passing the grid size as a command line argument to the program:\n`yayagram 3` or `yayagram 5` respectively.\n\nYou can also [load](#Loading-grid-files) the above example grid into the game with this file: [example.yaya](example.yaya).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwooster0%2Fyayagram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwooster0%2Fyayagram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwooster0%2Fyayagram/lists"}