{"id":283,"date":"2025-11-13T15:25:42","date_gmt":"2025-11-13T15:25:42","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/k_rai\/?p=283"},"modified":"2025-11-13T15:25:42","modified_gmt":"2025-11-13T15:25:42","slug":"snake-dash-11-10-25","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/k_rai\/2025\/11\/13\/snake-dash-11-10-25\/","title":{"rendered":"Snake Dash 11\/10\/25"},"content":{"rendered":"\n<p>I did my free friday that I missed , I decided to work on a pygame where its similar to the game snake <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"150\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/11\/snake-dash-1.png\" alt=\"\" class=\"wp-image-284\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/11\/snake-dash-1.png 512w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/11\/snake-dash-1-300x88.png 300w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n\n\n\n<p>The first few codes are basically to make the window where the game is located <\/p>\n\n\n\n<p>I made the window&#8217;s height and width into desirable lengths<\/p>\n\n\n\n<p>I also put the caption with the code display.set_caption<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"440\" height=\"410\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/11\/snake-dash-2.png\" alt=\"\" class=\"wp-image-285\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/11\/snake-dash-2.png 440w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/11\/snake-dash-2-300x280.png 300w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/figure>\n\n\n\n<p>I made the player and  made it into rectangle shape<\/p>\n\n\n\n<p>pygame.draw.rect(screen, (255, 0, 0,) player) puts the player on the window<\/p>\n\n\n\n<p>if and elif loops helps the player move  around <\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" style=\"aspect-ratio: 1920 \/ 1080;\" width=\"1920\" controls src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/11\/2025-11-13-10-17-11.mkv\"><\/video><\/figure>\n\n\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I did my free friday that I missed , I decided to work on a pygame where its similar to the game snake The first few codes are basically to make the window where the game is located I made the window&#8217;s height and width into desirable lengths I also put the caption with the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":286,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-283","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-free-friday"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/comments?post=283"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/283\/revisions"}],"predecessor-version":[{"id":288,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/283\/revisions\/288"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/media\/286"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/media?parent=283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/categories?post=283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/tags?post=283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}