{"id":19125523,"url":"https://github.com/dzimiks/tetrisai","last_synced_at":"2026-06-15T06:34:07.676Z","repository":{"id":120334515,"uuid":"108327951","full_name":"dzimiks/TetrisAI","owner":"dzimiks","description":"AI bot that can play Tetris. It was a seminary project for Intelligent systems course.","archived":false,"fork":false,"pushed_at":"2017-11-01T19:52:20.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-01T15:51:18.596Z","etag":null,"topics":["game","java","javaswing","tetris"],"latest_commit_sha":null,"homepage":"","language":"Java","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/dzimiks.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":"2017-10-25T21:26:49.000Z","updated_at":"2018-04-25T01:17:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6a81410-c28a-4e37-be8e-c95afb0b0bab","html_url":"https://github.com/dzimiks/TetrisAI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dzimiks/TetrisAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzimiks%2FTetrisAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzimiks%2FTetrisAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzimiks%2FTetrisAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzimiks%2FTetrisAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dzimiks","download_url":"https://codeload.github.com/dzimiks/TetrisAI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzimiks%2FTetrisAI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34351448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"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":["game","java","javaswing","tetris"],"created_at":"2024-11-09T05:35:58.742Z","updated_at":"2026-06-15T06:34:07.640Z","avatar_url":"https://github.com/dzimiks.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RAF TetrisAI\n\nThis is seminary work project written in Java. It represents basic Tetris simulation.\n\n![](https://i.imgur.com/jjAlkL3.png)\n\n## Getting Started\n\nHere are explanation and instructions how to play a game.\n\nTo play as human, run Frame class (use arrow keys).  \nTo see AI Bot in action, run TetrisBot class.  \nTo test multiple games at once, run TetrisTester class with appropriate settings.\n\n### Frame\n\nThis extends JFrame and it is instantiated to draw a state.\nThe main function allows you to play a game manually using the arrow keys (UP, RIGHT, BOTTOM, LEFT).\n\n### Label\n\nDrawing library.\n\n### State\n\nThis simulates a whole game. It keeps track of the state and allows you to make moves.\nMoves are defined by two numbers: the **SLOT**, the leftmost column of the piece and the **ORIENT**, \nthe orientation of the piece.\nNextPiece (accessed by getNextPiece) contains the ID (0-6) of the piece you are about to play.\nIt also keeps track of the number of lines cleared - accessed by getRowsCleared().\n\n```\ndraw() - draws the board\ndrawNext() - draws the next piece above the board\nclearNext() - clears the drawing of the next piece so it can be drawn in a different slot / orientation\n```\n### TetrisBot\n\nHere is implemented AI Bot player.\nThe main function plays a game automatically (with visualization).  \nYou can set speed in main function.\n\n### TetrisTester\n\nClass that tests one or multiple instances of the game.\n\n```\nTEST - number of tests (don't overstate)\nDRAW - true or false, if true, be careful with number of tests\n```\n\nLanguages Used:\n* Java\n\nTools Used:\n* Swing (for GUI)\n* Eclipse (IDE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzimiks%2Ftetrisai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdzimiks%2Ftetrisai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzimiks%2Ftetrisai/lists"}