{"id":16923848,"url":"https://github.com/bugaevc/tetris_school","last_synced_at":"2025-03-21T00:29:56.138Z","repository":{"id":71726869,"uuid":"53443438","full_name":"bugaevc/tetris_school","owner":"bugaevc","description":"The tetris game we were to write in 10th grade on winter vacation","archived":false,"fork":false,"pushed_at":"2016-03-08T21:15:42.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T21:12:02.063Z","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/bugaevc.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}},"created_at":"2016-03-08T20:37:06.000Z","updated_at":"2016-03-08T21:15:42.000Z","dependencies_parsed_at":"2023-05-18T02:45:19.958Z","dependency_job_id":null,"html_url":"https://github.com/bugaevc/tetris_school","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugaevc%2Ftetris_school","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugaevc%2Ftetris_school/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugaevc%2Ftetris_school/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugaevc%2Ftetris_school/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugaevc","download_url":"https://codeload.github.com/bugaevc/tetris_school/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244716893,"owners_count":20498278,"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-10-13T20:00:56.160Z","updated_at":"2025-03-21T00:29:56.112Z","avatar_url":"https://github.com/bugaevc.png","language":"Python","readme":"# tetris_school\n\nThe tetris game we were to write in 10th grade on winter vacation\n\nIt's Python 3-only an it depends on Pygame, so you'll have to run it with an old\nversion of Python, like python3.1\n\nProbably has a couple of bugs lurking around. I'm not striving to identify and\nfix them, because the code style is quite ugly, and it seems like I was starting\nto approach the callback hell.\n\nIt is quite interesting however that I, faced with the need of async\narchitecture, came up with the idea of callbacks, non-blocking functions, and\nessentially the event loop (I used pygame's built-in one, but it wasn't supposed\nto be used for async things). I certainly knew there were threads, but they\nseemed like an overkill for my simple needs of being able to close the window\nwhile animating.\n\nAnimations were implemented by simply looping and drawing frames one-by-one, so\nthey are likely to be quite fast on modern computers (mine was pretty old, and I\nwas developing on a VM that had an older Python version than my host machine).\n\nIt took some time (and lots of spaghetti code) to implement intelligent borders,\nrotation that doesn't accumulate error. The way colors were generated is\nstrange, too.\n\nThe most interesting thing is the bot. I'm not going to dive into the details\nhere, so see it for yourself if you manage to get it running.\n\nAnyway, have fun and please don't blame me!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugaevc%2Ftetris_school","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugaevc%2Ftetris_school","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugaevc%2Ftetris_school/lists"}