{"id":104,"date":"2026-01-20T15:09:42","date_gmt":"2026-01-20T15:09:42","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/d_bhujel\/?p=104"},"modified":"2026-01-20T15:09:42","modified_gmt":"2026-01-20T15:09:42","slug":"today-i-made-a-tetris-game","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/d_bhujel\/2026\/01\/20\/today-i-made-a-tetris-game\/","title":{"rendered":"Today I made a tetris game"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"527\" height=\"682\" src=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-5.png\" alt=\"\" class=\"wp-image-105\" srcset=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-5.png 527w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-5-232x300.png 232w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"604\" height=\"370\" src=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-6.png\" alt=\"\" class=\"wp-image-106\" srcset=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-6.png 604w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-6-300x184.png 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/figure>\n\n\n\n<p>this part of the code is in the background of the Tetris and the color of it and also tells you score.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"711\" height=\"413\" src=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-7.png\" alt=\"\" class=\"wp-image-107\" srcset=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-7.png 711w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-7-300x174.png 300w\" sizes=\"auto, (max-width: 711px) 100vw, 711px\" \/><\/figure>\n\n\n\n<p>this code lets you move your blocks around and switch it upside down and front to match the fitting<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"828\" height=\"493\" src=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-8.png\" alt=\"\" class=\"wp-image-108\" srcset=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-8.png 828w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-8-300x179.png 300w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-8-768x457.png 768w\" sizes=\"auto, (max-width: 828px) 100vw, 828px\" \/><\/figure>\n\n\n\n<p>this part is the grid i made following the YouTube video<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"677\" height=\"516\" src=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-9.png\" alt=\"\" class=\"wp-image-109\" srcset=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-9.png 677w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-9-300x229.png 300w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/figure>\n\n\n\n<p>this code has the sounds and score for each time you clear or rotate and a classic music<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"789\" height=\"344\" src=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-10.png\" alt=\"\" class=\"wp-image-110\" srcset=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-10.png 789w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-10-300x131.png 300w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-10-768x335.png 768w\" sizes=\"auto, (max-width: 789px) 100vw, 789px\" \/><\/figure>\n\n\n\n<p>These tells you the random blocks you can get <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"736\" height=\"336\" src=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-11.png\" alt=\"\" class=\"wp-image-111\" srcset=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-11.png 736w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-11-300x137.png 300w\" sizes=\"auto, (max-width: 736px) 100vw, 736px\" \/><\/figure>\n\n\n\n<p>this part is the code for different colors for the blocks<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"711\" src=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-12.png\" alt=\"\" class=\"wp-image-112\" srcset=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-12.png 780w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-12-300x273.png 300w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-12-768x700.png 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/figure>\n\n\n\n<p>this entire code is how you make the blocks for the grid<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"809\" height=\"762\" src=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-13.png\" alt=\"\" class=\"wp-image-113\" srcset=\"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-13.png 809w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-13-300x283.png 300w, https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-content\/uploads\/2026\/01\/image-13-768x723.png 768w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>this part of the code is in the background of the Tetris and the color of it and also tells you score. this code lets you move your blocks around and switch it upside down and front to match the fitting this part is the grid i made following the YouTube video this code has [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":114,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-104","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-free-friday"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/comments?post=104"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/posts\/104\/revisions"}],"predecessor-version":[{"id":115,"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/posts\/104\/revisions\/115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/media\/114"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/media?parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/categories?post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/d_bhujel\/wp-json\/wp\/v2\/tags?post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}