{"id":17011782,"url":"https://github.com/flaribbit/love2d_tetris","last_synced_at":"2026-05-14T21:02:02.069Z","repository":{"id":137699687,"uuid":"231208802","full_name":"flaribbit/love2d_tetris","owner":"flaribbit","description":null,"archived":false,"fork":false,"pushed_at":"2020-01-23T12:34:27.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T13:26:08.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/flaribbit.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":"2020-01-01T11:39:32.000Z","updated_at":"2020-01-09T12:51:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"1123bc2d-d786-4a35-8afc-69e5d35cda64","html_url":"https://github.com/flaribbit/love2d_tetris","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/flaribbit/love2d_tetris","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaribbit%2Flove2d_tetris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaribbit%2Flove2d_tetris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaribbit%2Flove2d_tetris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaribbit%2Flove2d_tetris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flaribbit","download_url":"https://codeload.github.com/flaribbit/love2d_tetris/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaribbit%2Flove2d_tetris/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33043249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":[],"created_at":"2024-10-14T06:07:59.460Z","updated_at":"2026-05-14T21:02:02.043Z","avatar_url":"https://github.com/flaribbit.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# love2d 俄罗斯方块\n\n一个简洁的俄罗斯方块小游戏，没有任何的美化，代码也算是比较优雅吧\n\n![QQ截图20200104190720.png](https://i.loli.net/2020/01/04/tJkem2FMcXQLoux.png)\n\n### 注释：\n* `game.lua` 游戏主要函数\n* `main.lua` 游戏主体逻辑\n* `Field` 存储场地，长度为40，按照表示从下到上的顺序\n* `Block` 存储当前手里的方块，`ij`是他相对于可视场地的坐标，`(1,1)`表示左上角，数组索引序\n* `Next` 存储Next序列，长度为6，遵循[bag7规则](https://tetris.wiki/Random_Generator)生成，外加`[0]`表示hold，取出下一个方块调用`Next:Shift()`\n* `blockdata.lua` 存储各个方块的数据，包括**每个小块的坐标和旋转中心**(坐标按数组索引序)，按照`ZSLJTOI`的顺序，**可自己自由添加其他方块**\n* `colordata.lua` 存储各个方块的颜色，HTML代码表示\n* `wallkick.lua` 存储[SRS旋转系统](https://tetris.wiki/Super_Rotation_System)的踢墙表数据\n* `control.lua` 自己定义的按键类，负责统一按键操作处理，便于触摸操作和ai接入\n* 代码逻辑清晰，函数的名字就是它的功能，我觉得不需要多余注释的\n\n### 关于GAtest分支\n本来是测试神经网络+遗传算法使用的，结果失败了，前期受方块序列影响太大，咕咕咕\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaribbit%2Flove2d_tetris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflaribbit%2Flove2d_tetris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaribbit%2Flove2d_tetris/lists"}