{"id":22724504,"url":"https://github.com/binghuan/tetris","last_synced_at":"2025-08-04T16:43:30.322Z","repository":{"id":71693216,"uuid":"54483037","full_name":"binghuan/tetris","owner":"binghuan","description":"Coding quest from \"BaseCase\"","archived":false,"fork":false,"pushed_at":"2018-09-03T08:09:30.000Z","size":4672,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"gh-pages","last_synced_at":"2025-03-29T23:18:06.972Z","etag":null,"topics":["assignment","game","javascript","take-home-test","tetris","webapp"],"latest_commit_sha":null,"homepage":"http://studiobinghuan.blogspot.tw/2016/03/tetris.html?view=flipcard","language":"JavaScript","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/binghuan.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}},"created_at":"2016-03-22T14:45:06.000Z","updated_at":"2025-02-20T19:30:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0b050a9-6e59-40f9-8ead-7a398650346b","html_url":"https://github.com/binghuan/tetris","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/binghuan/tetris","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binghuan%2Ftetris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binghuan%2Ftetris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binghuan%2Ftetris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binghuan%2Ftetris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binghuan","download_url":"https://codeload.github.com/binghuan/tetris/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binghuan%2Ftetris/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268723696,"owners_count":24296681,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"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":["assignment","game","javascript","take-home-test","tetris","webapp"],"created_at":"2024-12-10T15:06:56.413Z","updated_at":"2025-08-04T16:43:30.226Z","avatar_url":"https://github.com/binghuan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tetris\n\n\n\u003cimg src=\"Icon.png\" width=\"auto\" height=\"240\"\u003e\u003cbr/\u003e\n\n\u003cp\u003e\u003ch4\u003eMy blog:\u003c/h4\u003e\u003ca href=\"http://studiobinghuan.blogspot.tw/2016/03/tetris.html?view=flipcard\"\u003ehttp://studiobinghuan.blogspot.tw/2016/03/tetris.html?view=flipcard\u003c/a\u003e\u003c/p\u003e\n\nlink to launch the web app: \u003ca href=\"http://binghuan.github.io/tetris/\" target=\"_blank\"\u003ehttp://binghuan.github.io/tetris/\u003c/a\u003e\n\n#### There are 5 different pieces in this version of Tetris\n\n\n\u003cimg src=\"images/pieceType.png\" width=\"auto\" height=\"240px\"\u003e\n\n\nand they fall down a 20x20 tetris board:\n\n--------------------------------------------------------------------------------\n\nThe game starts with a random piece appearing at the top of the board. The user is then prompted to make a move: \u003cbr/\u003e\n• \u003cimg src=\"images/key_a.png\" width=\"36px\"\u003e(return): move piece left\u003cbr/\u003e\n• \u003cimg src=\"images/key_d.png\" width=\"36px\"\u003e(return): move piece right \u003cbr/\u003e\n• \u003cimg src=\"images/key_w.png\" width=\"36px\"\u003e (return): rotate piece counter clockwise \u003cbr/\u003e\n• \u003cimg src=\"images/key_s.png\" width=\"36px\"\u003e(return): rotate piece clockwise\u003cbr/\u003e\n\nIf the move the user selects is valid, then it is executed and the screen redrawn (you can use printf()/cout/System.out.println(), etc to redraw the entire board).\n\nIf the action is not valid, then the user is again prompted to enter a valid move. Note that the game only updates after the user has entered a valid action.\n\nA valid move is defined thus: The piece is altered as per the user's input, and then displaced by 1 row downwards.\n\nIf the piece, drawn at its new location, is not outside the bounds of the board, and does not overlap any pieces that previously fell, then the move is valid.\n\nIf the piece's new position is such that it allows no valid move, then a new piece appears along the top of the board, randomly positioned along the x-axis.\n\nIf this new piece happens offer no valid move, then the game is over and the program exits. Good Luck!\n\n\u003cimg src=\"images/Slide1.png\" width=\"auto\" height=\"480px\"\u003e\u003cbr/\u003e\n\u003cimg src=\"images/Slide2.png\" width=\"auto\" height=\"480px\"\u003e\u003cbr/\u003e\n\n\u003cbr/\u003e\nCoding quest from \"BaseCase\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinghuan%2Ftetris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinghuan%2Ftetris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinghuan%2Ftetris/lists"}