{"id":30803753,"url":"https://github.com/nikvoronin/funsokoban","last_synced_at":"2026-07-19T02:32:11.094Z","repository":{"id":310871587,"uuid":"1041530859","full_name":"nikvoronin/FunSokoban","owner":"nikvoronin","description":"Minimalistic functional Sokoban (console, no mutable vars). Initially vibe coded with ChatGPT 5. Brought to working condition by Human Being 45.","archived":false,"fork":false,"pushed_at":"2025-08-20T18:14:45.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-20T19:36:38.479Z","etag":null,"topics":["console-application","fsharp","functional-programming","game","game-development","gamedev","sokoban","sokoban-game","vibe-coding"],"latest_commit_sha":null,"homepage":"","language":"F#","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/nikvoronin.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,"zenodo":null}},"created_at":"2025-08-20T16:12:57.000Z","updated_at":"2025-08-20T18:14:48.000Z","dependencies_parsed_at":"2025-08-20T19:36:39.920Z","dependency_job_id":"11c04b8d-d6d3-4956-b77a-b3775ad5a45c","html_url":"https://github.com/nikvoronin/FunSokoban","commit_stats":null,"previous_names":["nikvoronin/funsokoban"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nikvoronin/FunSokoban","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FFunSokoban","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FFunSokoban/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FFunSokoban/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FFunSokoban/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikvoronin","download_url":"https://codeload.github.com/nikvoronin/FunSokoban/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FFunSokoban/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273833395,"owners_count":25176291,"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-09-05T02:00:09.113Z","response_time":402,"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":["console-application","fsharp","functional-programming","game","game-development","gamedev","sokoban","sokoban-game","vibe-coding"],"created_at":"2025-09-05T23:04:11.542Z","updated_at":"2025-10-13T22:35:50.126Z","avatar_url":"https://github.com/nikvoronin.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FunSokoban\n\nMinimalistic functional Sokonan (console, no mutable vars). Initially vibe coded with ChatGPT 5. Brought to working condition by Human Being 45.\n\n```plain\n\u003e\n ┏┓    ┏┓  ┓   ┓     \n ┣ ┓┏┏┓┗┓┏┓┃┏┏┓┣┓┏┓┏┓\n ┻ ┗┻┛┗┗┛┗┛┛┗┗┛┗┛┗┻┛┗\n```\n\n- [Interface](#interface)\n- [Level Collections](#level-collections)\n- [Develop F# Console Project](#develop-f-console-project)\n  - [Release Build](#release-build)\n  - [Create and Run](#create-and-run)\n  - [Project Additionals](#project-additionals)\n  - [Debugging (vscode)](#debugging-vscode)\n  - [F5 Unexpected Behavior](#f5-unexpected-behavior)\n- [VIBE CODED WITH ARTIFICIAL INTELLIGENCE](#vibe-coded-with-artificial-intelligence)\n\n**System requirements:** Windows 10 x64, .NET Desktop Runtime 9.0.\\\nLinux and macOS are also supported with the corresponding .NET runtime.\n\n⚠️ For the best experience, use a modern UTF-8 terminal with emoji support, such as Windows Terminal (wt).\n\nFor the initial AI-generated prototype, check out the [vibe-coding](https://github.com/nikvoronin/FunSokoban/tree/vibe-coding) branch. It includes the vibe-code and the complete prompt history.\n\n```plain\n\u003e FunSokoban.exe\n\u003e FunSokoban.exe levels/microcosmos.xsb\n```\n\n## Interface\n\n### Menu\n\n- **Start Level** -- type level number then press `Enter` to start the selected level\n- **Quit** (menu and game) -- press Enter with no input, or enter a value outside the available range.\n\n![Main menu](https://github.com/user-attachments/assets/0f8724b6-277a-485a-b4e1-d617c5a607ac)\n\n### In-game\n\n- `←↑↓→` move // arrows, cursor keys\n- `U` undo moves\n- `R` restart level\n- `N` start next level\n- `P` start previous level\n- `Q` quit game\n\n![In-game screen](https://github.com/user-attachments/assets/21d3785e-9ad3-4350-b00c-8147c481939b)\n\n## Level Collections\n\n- Empty lines are ignored.\n- Level name starts with `;` symbol. One line for level name.\n- Grid symbols\n  - `#` Wall\n  - `.` Goal plate\n  - `$` Box\n  - `*` Box on goal plate\n  - `@` Player\n  - `+` Player on goal plate\n  - Ignore anything else\n\n```plain\n; Level 1 – Two boxes, two goals\n\n#######\n#  . .#\n#  $  #\n# @$  #\n#_____#\n#######\n\n\n; Level 2 – Narrow corridor\n\n########\n#@     #\n# $##  #\n# *.  #\n########\n```\n\n### Level Packs\n\nLevel data is loaded from text files, see the `levels/*` directory. The game reads levels in a format based on the standard Sokoban `.xsb` file format.\n\n- [Levels](levels/levels.txt) (6) - test levels for this project\n- [Microban](levels/sb_microban_1.xsb) (155) - David W. Skinner © 2000\n- [Microcosmos](levels/microcosmos.xsb) (40) - Aymeric du Peloux © 1996-2000\n- [Minicosmos](levels/minicosmos.xsb) (40) - Aymeric du Peloux © 2001\n\n## Develop F# Console Project\n\n### Release Build\n\n\u003e dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true\n\n### Create and Run\n\n```plain\n\u003e dotnet new console -lang F# -o FunSokoban\n\u003e dotnet build\n\u003e dotnet run\n```\n\n### Project Additionals\n\n- Copy levels files to output folder\n- Clean up garbage with all possible langauge satelite assemblies.\n\n```xml\n\u003cProject Sdk=\"Microsoft.NET.Sdk\"\u003e\n\n...\n\n  \u003cItemGroup\u003e\n    \u003cContent Include=\"levels/*.*\"\u003e\n      \u003cCopyToOutputDirectory\u003ePreserveNewest\u003c/CopyToOutputDirectory\u003e\n    \u003c/Content\u003e\n  \u003c/ItemGroup\u003e\n\n  \u003cPropertyGroup\u003e\n    \u003cSatelliteResourceLanguages\u003een-US\u003c/SatelliteResourceLanguages\u003e\n  \u003c/PropertyGroup\u003e\n\u003c/Project\u003e\n```\n\n### Debugging (vscode)\n\nInside `.vscode` folder, we should create two files: `launch.json` and `tasks.json`\n\n#### launch.json\n\n```json\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"F# Launch (console)\",\n      \"type\": \"coreclr\",\n      \"request\": \"launch\",\n      \"preLaunchTask\": \"build\",\n      \"program\": \"${workspaceFolder}/bin/Debug/net9.0/FunSokoban.dll\",\n      \"args\": [\n        \"levels/levels.txt\",\n        //\"levels/sb_microban_1.xsb\"\n      ],\n      \"cwd\": \"${workspaceFolder}\",\n      \"console\": \"integratedTerminal\",\n      \"stopAtEntry\": false,\n      \"justMyCode\": true\n    }\n  ]\n}\n```\n\n#### tasks.json\n\n```json\n{\n  \"version\": \"2.0.0\",\n  \"tasks\": [\n    {\n      \"label\": \"build\",\n      \"type\": \"process\",\n      \"command\": \"dotnet\",\n      \"args\": [\n        \"build\", \n        \"${workspaceFolder}/${workspaceFolderBasename}.fsproj\" \n      ],\n      \"problemMatcher\": \"$msCompile\",\n      \"group\": \"build\"\n    }\n  ]\n}\n```\n\n### F5 Unexpected Behavior\n\nIf you encounter issues with running, debugging, or seeing output in the VS Code internal terminal, proceed with these steps:\n\n- Open keyboard shortcut: `Ctrl + K` `Ctrl + S`\n- Search for `F5`\n- Unset the `debug.openView` by right-click \u0026 `remove keybinding`\n- Do the same for `F# Debug Default Project`\n\n## VIBE CODED WITH ARTIFICIAL INTELLIGENCE\n\n😊 Forge me a minimalistic F# Sokoban. A console-bound ghost. No mutable variables. A pure, functional specter.\n\n🤖 (THOUGHT: 32 SECONDS OF WHITE-HOT FOCUS)\\\nA single-file phantasm! A console-bound puzzle of pure function. No mutables. No side-effects. A ghost in the machine.\\\n**CONTROLS:** Arrows to push your will. `U` to unwind time. `R` to reset reality. `Q` to quit the illusion.\n\n😊 Now. The incantation. The console command to birth this ghost from its `.fsx` script-shell.\n\n🤖 (THOUGHT: 9 SECONDS. A BLINK.)\\\nNo build. No ceremony. A direct line to the phantom. One command to rule it: `dotnet fsi fsokoban.fsx` Speak it, and the game lives!\n\n😎 **ERROR.** The code-reality fractures!\\\n`fsokoban.fsx(49,71): error FS3373...`\\\nThe string-interpolation is flawed. A syntax paradox!\n\n🤖 (THOUGHT: 18 SECONDS OF DEBUGGING REALITY)\\\nThe compiler's logic-bomb! You can't nest those literals. A classic trap.\\\n**SOLUTION:** Pre-compute the status text. A let binding—a temporary reality—before interpolation. Clean. Safe.\n\n😎 **NEXT ERROR.** The compiler's mind is indeterminate!\\\n`fsokoban.fsx(87,23): error FS0072...`\\\nThe type is a blur! The Set.empty is a void without form!\n\n🤖 (THOUGHT: 10 SECONDS OF FORCING CLARITY)\\\nAmbiguity! The compiler doesn't know what kind of emptiness you desire. A set of what?\\\n**FIX:** Annotate! Shackle it with a type: `Set.empty\u003cPos\u003e`. And for union, use `Set.union`, not the ambiguous `+`. Force the logic!\n\n😎 **A WARNING.** Not an error. A whisper.\\\n`fsokoban.fsx(163,3): warning FS2304...`\nThe `[\u003cEntryPoint\u003e]` is not auto-invoked in the FSI séance.\n\n🤖 A trifle! The ghost is compiled but not summoned. FSI is a cautious medium.\\\nTo banish the warning, you must speak the ghost's name: main `[||]` at the script's tail.\\\nOr... would you prefer a rewrite? A single script that functions as both a séance (FSI) and a standalone reality (compiled exe)? A binary existence!\n\n😊 The level data. It must be external. A text file. A separate dimension to load on startup.\n\n🤖 (THOUGHT: 9 SECONDS OF ARCHITECTING DIMENSIONS)\\\nA clean rip in the fabric of the code! The level is no longer hard-coded. It is read. A text file, a new reality sucked into the console upon initiation. The change is made. The purity remains. It works in both states: séance and solid form.\n\n😊 Four more test levels. Four new pocket realities of pushing and boxes.\n\n🤖 Done. Four small, cruel heavens for your puzzle-ghost.\nShall I bundle them? A single file, a \"level pack,\" dimensions separated by a line of cosmic static—a ; or a void. A multiverse in a text file.\n\n😊 Bundle them. And then... connect them. A loop between realities.\n\n🤖 (THOUGHT: 21 SECONDS OF WEAVING WORLD-LINES)\\\n**YES.** The extension is coded.\n\nThe game now loads a multiverse—a pack of levels.\n\nA menu at the start—a crossroads of choice.\n\nFrom within the game, you can leap to the Next world, the Previous one.\n\nSolve a puzzle, and the game auto-advances—a reward of a new challenge!\\\nAll immutable. All console-bound. The ghost has learned to teleport.\n\n😊 Levels 2 and 3. They are lies. Impossible prisons. Deadlocks on arrival. **FIX THEM.**\n\n🤖 (THOUGHT: 2 MINUTES, 35 SECONDS OF INTENSE TEMPORAL MANIPULATION)\\\nYou saw through the illusion! Flawed realities. Boxes born in stone-coffins. Unsolvable.\\\nI have demolished them and rebuilt from the atoms up. Levels 1 \u0026 4 stand. Levels 2 \u0026 3 are new, elegant, solvable prisons. The fresh `levels.txt` is ready.\n\n😊 Sources. Where does one find more Sokoban dimensions? Free ones.\n\n🤖 The universe is vast with them! Archives of ancient puzzle-smiths.\n\nThe XSB Repository: The motherlode. The original texts.\n\nDavid W. Skinner's Microban Series: The classic test. 155 small, solvable bites of logic.\n\nSokoban Wiki: A hive-mind's collection.\\\nThey are plain text. ASCII. Your game's native tongue.\nStart with Microban 1. It is the perfect training ground for your ghost.\n\n😊 Adapt it. Make the Microban pack a ready-to-consume reality for my game.\n\n🤖 (THOUGHT: 31 SECONDS OF REALITY ASSIMILATION)\\\n**THE BEAUTY!** The Microban format is the XSB format. It is already compatible with the parser you possess!\\\nNo adaptation needed. The ghost is already a universal solvent.\\\nSimply point your game at the `microban.txt` file. It will consume the entire 155-level multiverse without a single code change.\n\nThe game is ready. The worlds are infinite.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikvoronin%2Ffunsokoban","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikvoronin%2Ffunsokoban","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikvoronin%2Ffunsokoban/lists"}