{"id":23105388,"url":"https://github.com/wo0fle/virtual-sq1","last_synced_at":"2025-08-16T16:33:20.666Z","repository":{"id":244729338,"uuid":"816062603","full_name":"Wo0fle/virtual-sq1","owner":"Wo0fle","description":"Python module that simulates a Square-1 twisty puzzle.","archived":false,"fork":false,"pushed_at":"2024-07-10T02:45:51.000Z","size":234,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-14T13:11:49.421Z","etag":null,"topics":["python","python-module","rubiks-cube","square-1","twisty-puzzles"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Wo0fle.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":"2024-06-17T00:32:26.000Z","updated_at":"2024-07-10T02:45:55.000Z","dependencies_parsed_at":"2024-07-08T06:22:23.230Z","dependency_job_id":"dc30758f-7cac-436d-89f4-e40e4bd88e29","html_url":"https://github.com/Wo0fle/virtual-sq1","commit_stats":null,"previous_names":["wo0fle/virtual-sq1"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wo0fle%2Fvirtual-sq1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wo0fle%2Fvirtual-sq1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wo0fle%2Fvirtual-sq1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wo0fle%2Fvirtual-sq1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wo0fle","download_url":"https://codeload.github.com/Wo0fle/virtual-sq1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230045853,"owners_count":18164367,"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":["python","python-module","rubiks-cube","square-1","twisty-puzzles"],"created_at":"2024-12-17T00:50:24.673Z","updated_at":"2024-12-17T00:50:25.330Z","avatar_url":"https://github.com/Wo0fle.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# virtual-sq1\n\n### `pip install virtual-sq1`\n\n\u003cbr\u003e\n\n## Python module that simulates a [Square-1 twisty puzzle](https://ruwix.com/twisty-puzzles/square-1-back-to-square-one/)\n\n[![Build](https://github.com/Wo0fle/virtual-sq1/actions/workflows/main.yml/badge.svg)](https://github.com/Wo0fle/virtual-sq1/actions/workflows/main.yml)\n[![Coverage Status](https://coveralls.io/repos/github/Wo0fle/virtual-sq1/badge.svg?branch=main)](https://coveralls.io/github/Wo0fle/virtual-sq1?branch=main)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/virtual_sq1)](https://pypi.org/project/virtual_sq1/)\n\n## Usage\n\n### Import and create `Square1` object\n\n*Solved by default.*\n\n```python\nfrom virtual_sq1 import Square1\n\n\nmy_square_1 = Square1()\n```\n\n### View `Square1`'s current state\n\n*`virtual_sq1` uses (almost) the same position notation as [Jaap's Square-1 optimiser](https://www.jaapsch.net/puzzles/square1.htm#progs).*\n\n*Don't know how to read it? [Click here!](https://github.com/Wo0fle/virtual-sq1/blob/main/docs/jared19.md)*\n\n```python\nmy_square_1 = Square1()\n\nprint(my_square_1)\n# A1B2C3D4-5E6F7G8H\n```\n\n### Apply an algorithm to `Square1`\n\n```python\nmy_square_1 = Square1()\n\nmy_square_1.apply_alg(\"/ (3,0) / (-3,-3) / (0,3) /\")\n\nprint(my_square_1)\n# A1C3B2D4-5E7G6F8H\n```\n\n### Apply a case to `Square1`\n\n*Changes the Square1's state so that the input algorithm brings it to its current state.*\n\n```python\nmy_square_1 = Square1()\n\nmy_square_1.apply_alg(\"/ (3,0) / (1,0) / (0,-3) / (-1,0) / (-3,0) / (1,0) / (0,3) / (-1,0)\", True)\n\nprint(my_square_1)\n# A2B3C1D4-5E6F7G8H\n```\n\n*The distinction between a \"case\" and an \"algorithm\" was made by [Tyson Decker's puzzle-gen](https://tdecker91.github.io/puzzlegen-demo/)*\n\n### Apply a specific state to `Square1`\n\n```python\nmy_square_1 = Square1()\n\nmy_square_1.apply_state(\"ABCDEF GH12345678 /\")\n\nprint(my_square_1)\n# ABCDEF/GH12345678\n```\n\n### Apply a individual moves to `Square1`\n\n*Not sure why you'd do this when you could just use `apply_alg` but... it's an option.*\n\n```python\nmy_square_1 = Square1()\n\nmy_square_1.slash()  # a slice/slash move\nmy_square_1.top.turn(-3)  # turn the top layer -3\nmy_square_1.bottom.turn(3)  # turn the bottom layer 3\nmy_square_1.slash()  # a slice/slash move\nmy_square_1.top.turn(3)  # turn the top layer 3\nmy_square_1.bottom.turn(-3)  # turn the bottom layer -3\nmy_square_1.slash()  # a slice/slash move\n\nprint(my_square_1)\n# C3B2A1D4/5E8H7G6F\n```\n\n## Credits\n\nThis module was highly inspired by the following:\n- Tyson Decker's puzzle-gen: https://tdecker91.github.io/puzzlegen-demo/\n- Jaap's Square-1 optimiser: https://www.jaapsch.net/puzzles/square1.htm#progs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwo0fle%2Fvirtual-sq1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwo0fle%2Fvirtual-sq1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwo0fle%2Fvirtual-sq1/lists"}