{"id":21887177,"url":"https://github.com/informatter/text-tetris-engine","last_synced_at":"2025-03-22T02:15:23.088Z","repository":{"id":224977895,"uuid":"758251753","full_name":"informatter/text-tetris-engine","owner":"informatter","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-29T23:12:44.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T20:24:56.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/informatter.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}},"created_at":"2024-02-15T23:17:31.000Z","updated_at":"2024-02-28T15:49:06.000Z","dependencies_parsed_at":"2024-02-28T18:10:28.228Z","dependency_job_id":null,"html_url":"https://github.com/informatter/text-tetris-engine","commit_stats":null,"previous_names":["informatter/text-tetris-engine"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/informatter%2Ftext-tetris-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/informatter%2Ftext-tetris-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/informatter%2Ftext-tetris-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/informatter%2Ftext-tetris-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/informatter","download_url":"https://codeload.github.com/informatter/text-tetris-engine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244894308,"owners_count":20527678,"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":[],"created_at":"2024-11-28T11:08:38.993Z","updated_at":"2025-03-22T02:15:23.070Z","avatar_url":"https://github.com/informatter.png","language":"Python","readme":"# A simple text based tetris engine\n\nThe program which takes as input through the CLI a string encoding polyminoe's and their location on the board.\n\nThe following supported pieces are Q, S, Z, I, L, J and T. \n\n\u003ctable\u003e\n   \u003ctbody\u003e\u003ctr\u003e\n     \u003ctd\u003eLetter\u003c/td\u003e\n     \u003ctd\u003eQ\u003c/td\u003e\n     \u003ctd\u003eZ\u003c/td\u003e\n     \u003ctd\u003eS\u003c/td\u003e\n     \u003ctd\u003eT\u003c/td\u003e\n     \u003ctd\u003eI\u003c/td\u003e\n     \u003ctd\u003eL\u003c/td\u003e\n     \u003ctd\u003eJ\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n     \u003ctd\u003ePolyminoe\u003c/td\u003e\n     \u003ctd\u003e\n       \u003cpre\u003e ##\n ##\n       \u003c/pre\u003e\n     \u003c/td\u003e\n     \u003ctd\u003e\n       \u003cpre\u003e ##\n  ##\n       \u003c/pre\u003e\n     \u003c/td\u003e\n     \u003ctd\u003e\n       \u003cpre\u003e  ##\n ##\n       \u003c/pre\u003e\n     \u003c/td\u003e\n     \u003ctd\u003e\n       \u003cpre\u003e ###\n  #\n       \u003c/pre\u003e\n     \u003c/td\u003e\n     \u003ctd\u003e\n       \u003cpre\u003e ####\n       \u003c/pre\u003e\n     \u003c/td\u003e\n     \u003ctd\u003e\n       \u003cpre\u003e #\n #\n ##\n       \u003c/pre\u003e\n     \u003c/td\u003e\n     \u003ctd\u003e\n       \u003cpre\u003e  #\n  #\n ##\n       \u003c/pre\u003e\n     \u003c/td\u003e\n   \u003c/tr\u003e\n \u003c/tbody\u003e\u003c/table\u003e\n\n The input is provided as a string like:  'Q0,Q1'\n The integers correspond to the left most column the polyminoe should be placed at.\n\n The program outputs the final configuration height. For example if only a Q shape is left and its in the bottom of the board, the output would be 2\n\nBuilt against python 3.11.7 🐍\n\n\n## Running the engine\n\n### Install dependencies\nThe solution uses the following dependencies:\n- pytest\n- numpy\n- pyinstaller\n\n### Create virtual environment\n\n`python -m venv env`\n\n### Activate virtual environment\n\nWindows 🪟\n\n`env/scripts/activate.ps1`\n\nmacOS 🍎 / Linux 🐧\n\n`source env/bin/activate`\n\n### Install dependencies\n\n`pip install -r requirements.txt`\n\n### Run solver\n\n`python tetris.py 'Q0,Q2'`\n\nUse `--help for more options`\n\n# Run tests 🧪\n\n**Solver:**\n\n`pytest tests/tetris_solver_tests.py`\n\n**Polyminoe factory:**\n\n`pytest tests/factory_test.py`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finformatter%2Ftext-tetris-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finformatter%2Ftext-tetris-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finformatter%2Ftext-tetris-engine/lists"}