{"id":43624,"date":"2023-09-19T20:30:58","date_gmt":"2023-09-19T16:00:58","guid":{"rendered":"https:\/\/quera.org\/blog\/?p=43624"},"modified":"2025-04-21T16:59:22","modified_gmt":"2025-04-21T13:29:22","slug":"snake-game-in-python-tutorial","status":"publish","type":"post","link":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/","title":{"rendered":"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 &#8211; \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646"},"content":{"rendered":"\n<p>\u062a\u0642\u0631\u06cc\u0628\u0627 \u0647\u06cc\u0686\u200c\u06a9\u0633\u06cc \u0646\u06cc\u0633\u062a \u06a9\u0647 \u0628\u0627\u0632\u06cc \u0645\u0639\u0631\u0648\u0641 \u00ab\u0645\u0627\u0631\u00bb \u06cc\u0627 \u00abSnake\u00bb \u0631\u0627 \u062a\u062c\u0631\u0628\u0647 \u0646\u06a9\u0631\u062f\u0647 \u0628\u0627\u0634\u062f. \u0627\u06cc\u0646 \u0628\u0627\u0632\u06cc \u06a9\u0644\u0627\u0633\u06cc\u06a9 \u0633\u0627\u062e\u062a\u0627\u0631\u06cc \u0628\u0633\u06cc\u0627\u0631 \u0633\u0627\u062f\u0647 \u062f\u0627\u0631\u062f\u060c \u0627\u0645\u0627 \u0622\u0646\u0642\u062f\u0631 \u062f\u0631\u06af\u06cc\u0631\u06a9\u0646\u0646\u062f\u0647 \u0648 \u062c\u0630\u0627\u0628 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0627\u0626\u0645\u0627 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u062f \u0628\u0647 \u062a\u062c\u0631\u0628\u0647\u200c\u0627\u0634 \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u06cc\u062f \u0648 \u0631\u06a9\u0648\u0631\u062f \u0642\u0628\u0644\u06cc \u062e\u0648\u062f \u0631\u0627 \u0628\u0634\u06a9\u0646\u06cc\u062f. \u0627\u06af\u0631 \u0639\u0644\u0627\u0642\u0647\u200c\u0645\u0646\u062f \u0628\u0647 <a href=\"https:\/\/quera.org\/college\/\">\u0622\u0645\u0648\u0632\u0634 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc<\/a> \u06cc\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u062f\u0642\u06cc\u0642\u200c\u062a\u0631\u060c <a href=\"https:\/\/quera.org\/college\/landpage\/python\">\u0622\u0645\u0648\u0632\u0634 \u067e\u0627\u06cc\u062a\u0648\u0646<\/a> \u0628\u0627\u0634\u06cc\u062f\u060c \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u062a\u0645\u0631\u06cc\u0646 \u062e\u0648\u0628\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0647\u0645 \u0628\u0627\u0639\u062b \u0645\u06cc\u200c\u0634\u0648\u062f \u062e\u0644\u0627\u0642\u06cc\u062a \u0628\u0647 \u062e\u0631\u062c \u0628\u062f\u0647\u06cc\u062f \u0648 \u0647\u0645 \u0645\u0647\u0627\u0631\u062a\u200c\u0647\u0627\u06cc \u06a9\u0627\u0645\u067e\u06cc\u0648\u062a\u0631\u06cc \u062e\u0648\u062f \u0631\u0627 \u0635\u06cc\u0642\u0644 \u062f\u0647\u06cc\u062f. \u0628\u0627 \u06a9\u0648\u0626\u0631\u0627 \u0628\u0644\u0627\u06af \u0648 \u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627\u0634\u06cc\u062f.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u0627\u06af\u0631 \u0647\u0646\u0648\u0632 \u0645\u0637\u0645\u0626\u0646 \u0646\u06cc\u0633\u062a\u06cc\u062f \u06a9\u0647 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0628\u0631\u0627\u06cc\u062a\u0627\u0646 \u0645\u0646\u0627\u0633\u0628 \u0627\u0633\u062a \u06cc\u0627 \u0646\u0647\u060c \u06cc\u0627 \u0646\u0645\u06cc\u200c\u062f\u0627\u0646\u06cc\u062f \u0627\u0632 \u06a9\u062c\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u062f\u060c \u0645\u0627 \u06cc\u06a9 \u06a9\u0648\u06cc\u06cc\u0632 \u0633\u0627\u062f\u0647 \u0648 \u062c\u0630\u0627\u0628 \u0622\u0645\u0627\u062f\u0647 \u06a9\u0631\u062f\u0647\u200c\u0627\u06cc\u0645 \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u0628\u0647 \u0634\u0645\u0627 \u06a9\u0645\u06a9 \u06a9\u0646\u062f \u0645\u0633\u06cc\u0631 \u062f\u0631\u0633\u062a \u0631\u0627 \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f.<br>\u0647\u0645\u06cc\u0646 \u062d\u0627\u0644\u0627 \u0627\u0645\u062a\u062d\u0627\u0646 \u06a9\u0646\u06cc\u062f: <a href=\"https:\/\/quera.org\/college\/quiz\">\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0631\u0627 \u0627\u0632 \u06a9\u062c\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u0645<\/a><\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:20px\">\u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0686\u06cc\u0633\u062a \u0648 \u0686\u06af\u0648\u0646\u0647 \u0622\u0646 \u0631\u0627 \u0645\u06cc\u200c\u0633\u0627\u0632\u06cc\u0645\u061f<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"337\" src=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-logo.jpg\" alt=\"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646\" class=\"wp-image-43666\" srcset=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-logo.jpg 600w, https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-logo-300x169.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n<\/div>\n\n\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc Snake \u0631\u0627 \u06cc\u0627\u062f \u0645\u06cc\u200c\u06af\u06cc\u0631\u06cc\u0645 \u06a9\u0647 \u062f\u0631 \u0622\u0646\u060c \u0628\u0627\u0632\u06cc\u06a9\u0646 \u06a9\u0646\u062a\u0631\u0644 \u06cc\u06a9 \u0645\u0627\u0631 \u0631\u0627 \u0628\u0631\u0639\u0647\u062f\u0647 \u062f\u0627\u0631\u062f. \u0627\u06cc\u0646 \u0645\u0627\u0631 \u062f\u0631 \u0633\u0631\u0627\u0633\u0631 \u0635\u0641\u062d\u0647 \u062d\u0631\u06a9\u062a \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u063a\u0630\u0627\u0647\u0627\u06cc\u06cc \u0645\u06cc\u200c\u062e\u0648\u0631\u062f \u06a9\u0647 \u0627\u0648 \u0631\u0627 \u062f\u0631\u0627\u0632\u062a\u0631 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. \u0647\u0645\u06cc\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0645\u0627\u0631 \u062f\u0631\u0627\u0632 \u0648 \u062f\u0631\u0627\u0632\u062a\u0631 \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u0628\u0627\u06cc\u062f \u0628\u0647 \u062e\u0648\u0631\u062f\u0646 \u063a\u0630\u0627\u0647\u0627 \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u062f \u0648 \u062f\u0631 \u0639\u06cc\u0646 \u062d\u0627\u0644\u060c \u0628\u0627 \u0644\u0628\u0647\u200c\u0647\u0627\u06cc \u0635\u0641\u062d\u0647 \u06cc\u0627 \u0628\u062f\u0646 \u062e\u0648\u062f\u0634 \u0628\u0631\u062e\u0648\u0631\u062f \u0646\u06a9\u0646\u062f.<\/p>\n\n\n\n<p>\u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0627\u06cc\u0646 \u0628\u0627\u0632\u06cc \u0628\u0627\u06cc\u062f \u0627\u0632 \u06cc\u06a9 \u0631\u0627\u0628\u0637 \u06a9\u0627\u0631\u0628\u0631\u06cc \u06af\u0631\u0627\u0641\u06cc\u06a9\u06cc (Graphical User Interface | GUI) \u0645\u0627\u0646\u0646\u062f Pygame \u06cc\u0627 Tkinter \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0647\u0645 \u062f\u0631 \u0627\u0641\u0632\u0648\u062f\u0646 \u0627\u0628\u0639\u0627\u062f \u0628\u0635\u0631\u06cc \u06a9\u0645\u06a9 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u0647\u0645 \u0642\u0627\u0628\u0644\u06cc\u062a\u200c\u0647\u0627\u06cc\u06cc \u0645\u0627\u0646\u0646\u062f \u062b\u0628\u062a \u0648\u0631\u0648\u062f\u06cc \u06a9\u0627\u0631\u0628\u0631\u060c \u062d\u0631\u06a9\u062a \u0645\u0627\u0631\u060c \u062a\u0634\u062e\u06cc\u0635 \u0628\u0631\u062e\u0648\u0631\u062f\u060c \u062e\u0648\u0631\u062f\u0646 \u063a\u0630\u0627 \u0648 Game Over \u0631\u0627 \u062f\u0631 \u0627\u062e\u062a\u06cc\u0627\u0631\u0645\u0627\u0646 \u0645\u06cc\u200c\u06af\u0630\u0627\u0631\u062f.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:20px\">\u067e\u06cc\u0634\u200c\u0646\u06cc\u0627\u0632\u0647\u0627\u06cc \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646<\/h2>\n\n\n\n<p>\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0628\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u06cc\u0646 \u067e\u0631\u0648\u0698\u0647 \u0631\u0627 \u0628\u0647 \u062e\u0648\u0628\u06cc \u067e\u06cc\u0634 \u0628\u0628\u0631\u06cc\u062f\u060c \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 \u0645\u0628\u0627\u0646\u06cc \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0648 \u0645\u0628\u0627\u0646\u06cc \u0632\u0628\u0627\u0646 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0627\u0631\u06cc\u062f \u0648 \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0646\u06cc\u0632 \u0641\u0631\u0627\u06cc\u0646\u062f \u0631\u0627 \u0628\u0647\u06cc\u0646\u0647\u200c\u062a\u0631 \u0648 \u0622\u0633\u0627\u0646\u200c\u062a\u0631 \u062e\u0648\u0627\u0647\u0646\u062f \u06a9\u0631\u062f:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0645\u0628\u0627\u0646\u06cc \u067e\u0627\u06cc\u062a\u0648\u0646<\/strong>: \u062f\u0627\u0646\u0634 \u0631\u0627\u062c\u0639 \u0628\u0647 \u0645\u062a\u063a\u06cc\u0631\u0647\u0627\u060c \u0627\u0646\u0648\u0627\u0639 \u062f\u0627\u062f\u0647\u060c \u0634\u0631\u0637\u200c\u0647\u0627\u060c \u0644\u0648\u067e\u200c\u0647\u0627\u060c \u062a\u0648\u0627\u0628\u0639 \u0648 \u06a9\u0627\u0631 \u0628\u0627 \u0648\u0631\u0648\u062f\u06cc\u200c\u0647\u0627 \u0648 \u062e\u0631\u0648\u062c\u06cc\u200c\u0647\u0627<\/li>\n\n\n\n<li><strong>\u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627<\/strong>: \u062f\u0631\u06a9 \u0645\u0641\u0627\u0647\u06cc\u0645\u06cc \u0645\u0627\u0646\u0646\u062f \u06a9\u0644\u0627\u0633\u200c\u0647\u0627\u060c \u0627\u0634\u06cc\u0627 \u0648 \u0648\u0631\u0627\u062b\u062a \u062f\u0631 \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc \u0634\u06cc \u06af\u0631\u0627 (Object-Oriented Programming | OOP) \u0628\u0647 \u0646\u0648\u0634\u062a\u0646 \u06a9\u062f\u06cc \u0633\u0627\u062e\u062a\u0627\u0631\u0645\u0646\u062f \u06a9\u0645\u06a9 \u0645\u06cc\u200c\u06a9\u0646\u062f. <\/li>\n\n\n\n<li><strong>\u0622\u0634\u0646\u0627\u06cc\u06cc \u0628\u0627 Pygame \u06cc\u0627 Tkinter<\/strong>: \u0628\u0633\u062a\u0647 \u0628\u0647 \u0627\u06cc\u0646\u06a9\u0647 \u0627\u0632 \u06a9\u062f\u0627\u0645 \u067e\u06a9\u06cc\u062c \u06af\u0631\u0627\u0641\u06cc\u06a9\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f\u060c \u0644\u0627\u0632\u0645 \u0627\u0633\u062a \u0628\u0627 Pygame \u06cc\u0627 Tkinter \u0622\u0634\u0646\u0627 \u0628\u0627\u0634\u06cc\u062f \u062a\u0627 \u0635\u0641\u062d\u0647 \u06af\u0631\u0627\u0641\u06cc\u06a9\u06cc \u0648 \u0648\u0642\u0627\u06cc\u0639 \u0628\u0627\u0632\u06cc \u0631\u0627 \u0628\u0633\u0627\u0632\u06cc\u062f. <\/li>\n\n\n\n<li><strong>\u0645\u062f\u06cc\u0631\u06cc\u062a \u0648\u0631\u0648\u062f\u06cc \u06a9\u0627\u0631\u0628\u0631<\/strong>: \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u06a9\u0647 \u0628\u0634\u0648\u062f \u0645\u0627\u0631 \u0631\u0627 \u0628\u0647 \u062d\u0631\u06a9\u062a \u062f\u0631\u0622\u0648\u0631\u062f\u060c \u0628\u0627\u06cc\u062f \u0628\u0627 \u0646\u062d\u0648\u0647 \u062b\u0628\u062a \u0648 \u0631\u0633\u06cc\u062f\u06af\u06cc \u0628\u0647 \u0648\u0631\u0648\u062f\u06cc \u06a9\u0627\u0631\u0628\u0631 \u06cc\u0627 User Input \u0622\u0634\u0646\u0627 \u0628\u0627\u0634\u06cc\u062f. <\/li>\n\n\n\n<li><strong>\u0627\u06cc\u062f\u0647\u200c\u0647\u0627\u06cc \u0628\u0646\u06cc\u0627\u062f\u06cc\u0646 \u0628\u0627\u0632\u06cc\u200c\u0633\u0627\u0632\u06cc<\/strong>: \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc Snake \u0628\u0627\u06cc\u062f \u0644\u0648\u067e \u0628\u0627\u0632\u06cc\u200c\u0647\u0627\u060c \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0648\u0636\u0639\u06cc\u062a \u0628\u0627\u0632\u06cc\u060c \u0633\u0627\u062e\u062a \u062a\u0635\u0648\u06cc\u0631 \u0648 \u062b\u0628\u062a \u0628\u0631\u062e\u0648\u0631\u062f\u0627\u0631\u0647\u0627 \u0631\u0627 \u062f\u0631\u06a9 \u06a9\u0646\u06cc\u062f.<\/li>\n\n\n\n<li><strong>\u0641\u0647\u0631\u0633\u062a\u200c\u0647\u0627 \u0648 \u0622\u0631\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u062f\u0648\u0628\u0639\u062f\u06cc<\/strong>: \u0627\u06af\u0631 \u0646\u062d\u0648\u0647 \u06a9\u0627\u0631 \u0628\u0627 \u0641\u0647\u0631\u0633\u062a\u200c\u0647\u0627 \u0648 \u0622\u0631\u0627\u06cc\u0647\u200c\u0647\u0627\u06cc \u062f\u0648\u0628\u0639\u062f\u06cc \u0631\u0627 \u0628\u062f\u0627\u0646\u06cc\u062f\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0635\u0641\u062d\u0647 \u0628\u0627\u0632\u06cc \u0631\u0627 \u0628\u0647 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0631\u0622\u0648\u0631\u06cc\u062f \u0648 \u0645\u0648\u0642\u0639\u06cc\u062a \u0645\u0627\u0631 \u0631\u0627 \u06a9\u0646\u062a\u0631\u0644 \u06a9\u0646\u06cc\u062f. <\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"338\" src=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/pygame.jpg\" alt=\"\u0631\u0627\u0628\u0637 \u06a9\u0627\u0631\u0628\u0631\u06cc \u06af\u0631\u0627\u0641\u06cc\u06a9\u06cc Pygame\" class=\"wp-image-43663\" srcset=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/pygame.jpg 600w, https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/pygame-300x169.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n<\/div>\n\n\n<p>\u0627\u06af\u0631\u0686\u0647 \u0644\u0627\u0632\u0645 \u0646\u06cc\u0633\u062a \u062f\u0631 \u062a\u0645\u0627\u0645\u06cc \u0627\u06cc\u0646 \u062d\u0648\u0632\u0647\u200c\u0647\u0627 \u062a\u062c\u0631\u0628\u0647 \u06a9\u0633\u0628 \u06a9\u0631\u062f\u0647 \u0628\u0627\u0634\u06cc\u062f\u060c \u0647\u0631\u0686\u0647 \u062f\u0627\u0646\u0634 \u0627\u0648\u0644\u06cc\u0647 \u0628\u06cc\u0634\u062a\u0631 \u0628\u0627\u0634\u062f\u060c \u0642\u0648\u0627\u0639\u062f \u0628\u0627\u0632\u06cc \u0631\u0627 \u0631\u0627\u062d\u062a\u200c\u062a\u0631 \u062f\u0631\u06a9 \u0648 \u067e\u06cc\u0627\u062f\u0647\u200c\u0633\u0627\u0632\u06cc \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f. \u0636\u0645\u0646\u0627 \u0646\u0635\u0628 \u06cc\u06a9 \u0645\u062d\u06cc\u0637 \u062a\u0648\u0633\u0639\u0647 \u06cc\u06a9\u067e\u0627\u0631\u0686\u0647 (Integrated Development Environment | IDE) \u0645\u0627\u0646\u0646\u062f PyCharm \u060cVisual Studio Code \u06cc\u0627 IDLE \u0647\u0645 \u0627\u06cc\u062f\u0647 \u0628\u062f\u06cc \u0646\u06cc\u0633\u062a. \u0628\u0647 \u0627\u06cc\u0646 \u062a\u0631\u062a\u06cc\u0628 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u06a9\u062f \u067e\u0627\u06cc\u062a\u0648\u0646 \u0631\u0627 \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f \u0648 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f. <\/p>\n\n\n\n<p><strong>\u0628\u06cc\u0634\u062a\u0631 \u0628\u062e\u0648\u0627\u0646\u06cc\u062f: <a href=\"https:\/\/quera.org\/blog\/best-python-ides-and-code-editors\/\">\u0628\u0647\u062a\u0631\u06cc\u0646 IDE \u067e\u0627\u06cc\u062a\u0648\u0646<\/a><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"font-size:18px\">\u06f1. \u0646\u0635\u0628 Pygame<\/h3>\n\n\n\n<p>\u0627\u0648\u0644\u06cc\u0646 \u06a9\u0627\u0631\u06cc \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u0631\u0627\u06cc \u0628\u0627\u0632\u06cc\u200c\u0633\u0627\u0632\u06cc \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u0646\u062c\u0627\u0645 \u062f\u0627\u062f\u060c \u0646\u0635\u0628 Pygame \u0631\u0648\u06cc \u0633\u06cc\u0633\u062a\u0645 \u0627\u0633\u062a. \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0641\u0631\u0645\u0627\u0646 \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"basic\" class=\"language-basic\"><em>pip install pygame<\/em><\/code><\/pre>\n\n\n\n<p>\u0628\u0639\u062f \u0627\u0632 \u0627\u06cc\u0646\u060c Pygame \u0631\u0627 \u0627\u06cc\u0645\u067e\u0648\u0631\u062a \u0648 \u0631\u0648\u0646\u062f \u062a\u0648\u0633\u0639\u0647 \u0628\u0627\u0632\u06cc \u0631\u0627 \u0634\u0631\u0648\u0639 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645. \u0627\u0645\u0627 \u0642\u0628\u0644 \u0627\u0632 \u0627\u06cc\u0646\u06a9\u0647 \u0628\u0647 \u0645\u0631\u062d\u0644\u0647 \u0628\u0639\u062f\u06cc \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0628\u0631\u0648\u06cc\u0645\u060c \u0646\u06af\u0627\u0647\u06cc \u0628\u0647 \u062a\u0648\u0627\u0628\u0639 \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc Pygame \u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0628\u06cc\u0646\u062f\u0627\u0632\u06cc\u062f:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">\u062a\u0648\u0627\u0628\u0639<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u06a9\u0627\u0631\u06a9\u0631\u062f<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">()init<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u062a\u0645\u0627\u0645 \u0645\u0627\u0698\u0648\u0644\u200c\u0647\u0627\u06cc \u0627\u06cc\u0645\u067e\u0648\u0631\u062a\u200c\u0634\u062f\u0647 Pygame (\u0645\u0648\u0641\u0642\u06cc\u062a \u06cc\u0627 \u0634\u06a9\u0633\u062a \u062f\u0631 \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u062a\u0627\u067e\u0644 \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f)<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">()display.set_mode<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u06cc\u06a9 \u062a\u0627\u067e\u0644 \u06cc\u0627 \u0641\u0647\u0631\u0633\u062a \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0633\u0627\u062e\u062a \u0633\u0637\u062d \u062f\u0631 \u0646\u0638\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">()update<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u0635\u0641\u062d\u0647 \u0631\u0627 \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">()quit<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u0628\u0631\u0627\u06cc \u0645\u062a\u0648\u0642\u0641 \u06a9\u0631\u062f\u0646 \u0647\u0645\u0647\u200c\u0686\u06cc\u0632 \u0628\u0647 \u06a9\u0627\u0631 \u0645\u06cc\u200c\u0631\u0648\u062f<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">()set_caption<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u0645\u062a\u0646 \u06a9\u067e\u0634\u0646 \u0631\u0627 \u062f\u0631 \u0628\u0627\u0644\u0627\u06cc \u0635\u0641\u062d\u0647 \u0646\u0645\u0627\u06cc\u0634 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u062f\u0647\u062f<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">()event.get<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u0641\u0647\u0631\u0633\u062a\u06cc \u0627\u0632 \u062a\u0645\u0627\u0645 \u0648\u0642\u0627\u06cc\u0639 \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">()Surface.fill<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u0633\u0637\u062d \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u0631\u0646\u06af \u067e\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">()time.Clock<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u0628\u0647 \u067e\u0627\u06cc\u0634 \u0632\u0645\u0627\u0646 \u06a9\u0645\u06a9 \u0645\u06cc\u200c\u06a9\u0646\u062f<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">()font.SysFont<\/td><td class=\"has-text-align-center\" data-align=\"center\">\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0641\u0648\u0646\u062a\u200c\u0647\u0627\u06cc \u0633\u06cc\u0633\u062a\u0645\u060c \u06cc\u06a9 \u0641\u0648\u0646\u062a Pygame \u0645\u06cc\u200c\u0633\u0627\u0632\u062f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"font-size:18px\">\u06f2. \u0633\u0627\u062e\u062a \u0635\u0641\u062d\u0647 \u0628\u0627\u0632\u06cc<\/h3>\n\n\n\n<p>\u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0635\u0641\u062d\u0647 \u06cc\u0627 Screen \u0628\u0647 \u06a9\u0645\u06a9 Pygame\u060c \u0628\u0627\u06cc\u062f \u0627\u0632 \u062a\u0627\u0628\u0639 ()display.set_mode \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645. \u0639\u0644\u0627\u0648\u0647 \u0628\u0631 \u0627\u06cc\u0646\u060c \u0628\u0631\u0627\u06cc \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u0648 \u0645\u062a\u0648\u0642\u0641 \u06a9\u0631\u062f\u0646 \u0647\u0645\u0647\u200c\u0686\u06cc\u0632 \u062f\u0631 \u0627\u0628\u062a\u062f\u0627 \u0648 \u0627\u0646\u062a\u0647\u0627\u06cc \u06a9\u062f\u060c \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062a\u062f\u0647\u0627\u06cc ()init \u0648 ()quit \u062e\u0648\u0627\u0647\u06cc\u062f \u062f\u0627\u0634\u062a. \u0627\u0632 \u0645\u062a\u062f ()update \u0647\u0645 \u0628\u0631\u0627\u06cc \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0647\u0631 \u062a\u063a\u06cc\u06cc\u0631\u06cc \u062f\u0631 \u0635\u0641\u062d\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0646\u0627\u06af\u0641\u062a\u0647 \u0646\u0645\u0627\u0646\u062f \u06a9\u0647 \u0645\u062a\u062f \u062f\u06cc\u06af\u0631\u06cc \u0628\u0647 \u0627\u0633\u0645 ()flip \u0646\u06cc\u0632 \u062f\u0627\u0631\u06cc\u0645 \u06a9\u0647 \u0634\u0628\u06cc\u0647 \u0628\u0647 \u062a\u0627\u0628\u0639 ()update \u0639\u0645\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u062a\u0641\u0627\u0648\u062a \u062f\u0631 \u0627\u06cc\u0646 \u0627\u0633\u062a \u06a9\u0647 ()update \u0635\u0631\u0641\u0627 \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0631\u0627 \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0627\u0645\u0627 ()flip \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u0631\u0627 \u0627\u0632 \u0646\u0648 \u0645\u06cc\u200c\u0633\u0627\u0632\u062f. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\u06a9\u062f<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python line-numbers\">import pygame\npygame.init()\ndis=pygame.display.set_mode((400,300))\npygame.display.update()\npygame.quit()\nquit()<\/code><\/pre>\n\n\n\n<p><strong>\u062e\u0631\u0648\u062c\u06cc<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"399\" height=\"329\" src=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/display1-Snake-Game-in-Python-Edureka.jpg\" alt=\"\u0633\u0627\u062e\u062a \u0635\u0641\u062d\u0647 \u0628\u0627\u0632\u06cc\" class=\"wp-image-43672\" srcset=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/display1-Snake-Game-in-Python-Edureka.jpg 399w, https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/display1-Snake-Game-in-Python-Edureka-300x247.jpg 300w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/figure>\n<\/div>\n\n\n<p>\u0648\u0642\u062a\u06cc \u0627\u06cc\u0646 \u06a9\u062f \u0631\u0627 \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f\u060c \u0635\u0641\u062d\u0647 \u0638\u0627\u0647\u0631 \u0627\u0645\u0627 \u0641\u0648\u0631\u0627 \u0628\u0633\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0628\u0631\u0627\u06cc \u062d\u0644 \u0627\u06cc\u0646 \u0645\u0634\u06a9\u0644 \u0628\u0627\u06cc\u062f \u0627\u0632 While Loop \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0644\u0648\u067e \u0628\u0627\u0632\u06cc \u06a9\u0645\u06a9 \u0628\u06af\u06cc\u0631\u06cc\u0645:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python line-numbers\">import pygame\npygame.init()\ndis=pygame.display.set_mode((400,300))\npygame.display.update()\npygame.display.set_caption('Snake game by Edureka')\ngame_over=False\nwhile not game_over:\n    for event in pygame.event.get():\n        print(event)   #prints out all the actions that take place on the screen\n \npygame.quit()\nquit()<\/code><\/pre>\n\n\n\n<p>\u0648\u0642\u062a\u06cc \u0627\u06cc\u0646 \u06a9\u062f \u0631\u0627 \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f\u060c \u0645\u06cc\u200c\u0628\u06cc\u0646\u06cc\u062f \u0635\u0641\u062d\u0647\u200c\u0627\u06cc \u06a9\u0647 \u067e\u06cc\u0634\u200c\u062a\u0631 \u0645\u0634\u0627\u0647\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0631\u062f\u06cc\u062f \u0628\u0633\u062a\u0647 \u0646\u0645\u06cc\u200c\u0634\u0648\u062f \u0648 \u0636\u0645\u0646\u0627\u060c \u062a\u0645\u0627\u0645 \u0627\u06a9\u0634\u0646\u200c\u0647\u0627\u06cc\u06cc \u0631\u0627 \u0628\u0627\u0632\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f \u06a9\u0647 \u0631\u0648\u06cc \u0622\u0646 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0627\u0632 \u062a\u0627\u0628\u0639 ()event.get \u06a9\u0645\u06a9 \u06af\u0631\u0641\u062a\u0647\u200c\u0627\u06cc\u0645. \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062a\u0627\u0628\u0639 ()display.set_caption \u0647\u0645 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u06cc\u06a9 \u0646\u0627\u0645 \u0628\u0631\u0627\u06cc \u0635\u0641\u062d\u0647 \u062e\u0648\u062f \u0628\u0646\u0648\u06cc\u0633\u06cc\u062f \u06a9\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u062b\u0627\u0644 \u00abSnake game by Edureka\u00bb \u0627\u0633\u062a. <\/p>\n\n\n\n<p><strong>\u062e\u0631\u0648\u062c\u06cc<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"399\" height=\"328\" src=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/display2-Snake-Game-in-Python-Edureka.jpg\" alt=\"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646\" class=\"wp-image-43671\" srcset=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/display2-Snake-Game-in-Python-Edureka.jpg 399w, https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/display2-Snake-Game-in-Python-Edureka-300x247.jpg 300w\" sizes=\"auto, (max-width: 399px) 100vw, 399px\" \/><\/figure>\n<\/div>\n\n\n<p>\u0627\u06a9\u0646\u0648\u0646 \u0635\u0641\u062d\u0647 \u0628\u0627\u0632\u06cc Snake \u0631\u0627 \u0645\u06cc\u200c\u0628\u06cc\u0646\u06cc\u062f\u060c \u0627\u0645\u0627 \u0648\u0642\u062a\u06cc \u0631\u0648\u06cc \u062f\u06a9\u0645\u0647 \u0628\u0633\u062a\u0646 \u06cc\u0627 Close \u06a9\u0644\u06cc\u06a9 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f\u060c \u0647\u06cc\u0686 \u0627\u062a\u0641\u0627\u0642\u06cc \u0646\u0645\u06cc\u200c\u0627\u0641\u062a\u062f. \u0628\u0647 \u0627\u06cc\u0646 \u062e\u0627\u0637\u0631 \u06a9\u0647 \u0628\u0633\u062a\u0647 \u0634\u062f\u0646 \u0635\u0641\u062d\u0647 \u0628\u0639\u062f \u0627\u0632 \u0641\u0634\u0631\u062f\u0646 \u062f\u06a9\u0645\u0647 Close \u0631\u0627 \u062a\u0639\u0631\u06cc\u0641 \u0646\u06a9\u0631\u062f\u0647\u200c\u0627\u06cc\u062f. \u0628\u0631\u0627\u06cc \u0627\u0646\u062c\u0627\u0645 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0627\u0632 \u0631\u0648\u06cc\u062f\u0627\u062f\u06cc \u0628\u0647 \u0646\u0627\u0645 \u00abQUIT\u00bb \u062f\u0631 Pygame \u06a9\u0645\u06a9 \u0645\u06cc\u200c\u06af\u06cc\u0631\u06cc\u0645 \u06a9\u0647 \u0628\u0627\u06cc\u062f \u0628\u0647 \u0634\u06a9\u0644 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python line-numbers\">import pygame\npygame.init()\ndis=pygame.display.set_mode((400,300))\npygame.display.update()\npygame.display.set_caption('Snake game by Edureka')\ngame_over=False\nwhile not game_over:\n    for event in pygame.event.get():\n        if event.type==pygame.QUIT:\n            game_over=True\n \npygame.quit()\nquit()<\/code><\/pre>\n\n\n\n<p>\u0627\u06a9\u0646\u0648\u0646 \u0635\u0641\u062d\u0647 \u06a9\u0627\u0645\u0644\u0627 \u0622\u0645\u0627\u062f\u0647 \u0627\u0633\u062a. \u062f\u0631 \u0645\u0631\u062d\u0644\u0647 \u0628\u0639\u062f\u06cc \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0645\u06cc\u200c\u0628\u06cc\u0646\u06cc\u0645 \u06a9\u0647 \u0686\u0637\u0648\u0631 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0634\u062e\u0635\u06cc\u062a \u0627\u0635\u0644\u06cc \u0631\u0627 \u0647\u0645 \u0628\u0647 \u0635\u0641\u062d\u0647 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"font-size:18px\">\u06f3. \u0633\u0627\u062e\u062a \u0645\u0627\u0631<\/h3>\n\n\n\n<p>\u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0645\u0627\u0631 \u0627\u0628\u062a\u062f\u0627 \u0686\u0646\u062f \u0645\u062a\u063a\u06cc\u0631 \u0631\u0646\u06af\u06cc \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u062a\u0627 \u0628\u062a\u0648\u0627\u0646\u06cc\u0645 \u0628\u0631\u0627\u06cc \u0645\u0627\u0631\u060c \u063a\u0630\u0627\u060c \u0635\u0641\u062d\u0647 \u0648 \u062a\u0645\u0627\u0645 \u0645\u0648\u0627\u0631\u062f \u0627\u06cc\u0646\u200c\u0686\u0646\u06cc\u0646\u06cc \u0631\u0646\u06af\u06cc \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u0645. Pygame \u0627\u0632 \u0631\u0646\u06af\u200c\u0647\u0627\u06cc \u00abRGB\u00bb \u06cc\u0627 \u00abRed Green Blue\u00bb \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u06af\u0631 \u062a\u0645\u0627\u0645 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0631\u0627 \u0631\u0648\u06cc 0 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f\u060c \u0631\u0646\u06af \u0645\u0634\u06a9\u06cc \u0645\u06cc\u200c\u0634\u0648\u062f \u0648 \u0627\u06af\u0631 \u062a\u0645\u0627\u0645 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0631\u0627 \u0631\u0648\u06cc 555 \u0628\u06af\u0630\u0627\u0631\u06cc\u062f\u060c \u0631\u0646\u06af \u0633\u0641\u06cc\u062f \u0628\u0647 \u062f\u0633\u062a \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0648\u0631\u062f. \u0645\u0627\u0631 \u0628\u0627\u0632\u06cc \u0645\u0627 \u062f\u0631 \u0627\u0628\u062a\u062f\u0627 \u0686\u06cc\u0632\u06cc \u062c\u0632 \u06cc\u06a9 \u0645\u0631\u0628\u0639 \u06a9\u0648\u0686\u06a9 \u0646\u06cc\u0633\u062a. \u0628\u0631\u0627\u06cc \u0631\u0633\u0645 \u0645\u0631\u0628\u0639 \u062f\u0631 Pygame\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u062a\u0627\u0628\u0639\u06cc \u0628\u0647 \u0646\u0627\u0645 ()draw.rect \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0628\u0647 \u062a\u0631\u0633\u06cc\u0645 \u0645\u0631\u0628\u0639\u06cc \u0628\u0627 \u0631\u0646\u06af \u0648 \u0627\u0628\u0639\u0627\u062f \u062f\u0644\u062e\u0648\u0627\u0647 \u06a9\u0645\u06a9 \u0645\u06cc\u200c\u06a9\u0646\u062f. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python line-numbers\">import pygame\npygame.init()\ndis=pygame.display.set_mode((400,300))\n \npygame.display.set_caption('Snake game by Edureka')\n \nblue=(0,0,255)\nred=(255,0,0)\n \ngame_over=False\nwhile not game_over:\n    for event in pygame.event.get():\n        if event.type==pygame.QUIT:\n            game_over=True\n    pygame.draw.rect(dis,blue,[200,150,10,10])\n    pygame.display.update()\npygame.quit()\nquit()<\/code><\/pre>\n\n\n\n<p><strong>\u062e\u0631\u0648\u062c\u06cc<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"396\" height=\"326\" src=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/creating-the-snake-Snake-Game-in-Python-Edureka.jpg\" alt=\"\u0633\u0627\u062e\u062a \u0645\u0627\u0631\" class=\"wp-image-43670\" srcset=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/creating-the-snake-Snake-Game-in-Python-Edureka.jpg 396w, https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/creating-the-snake-Snake-Game-in-Python-Edureka-300x247.jpg 300w\" sizes=\"auto, (max-width: 396px) 100vw, 396px\" \/><\/figure>\n<\/div>\n\n\n<p>\u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0645\u06cc\u200c\u0628\u06cc\u0646\u06cc\u062f\u060c \u0633\u0631 \u0645\u0627\u0631 \u0628\u0647 \u0634\u06a9\u0644 \u06cc\u06a9 \u0645\u0631\u0628\u0639 \u0622\u0628\u06cc\u200c\u0631\u0646\u06af \u062a\u0631\u0633\u06cc\u0645 \u0634\u062f\u0647 \u0627\u0633\u062a. \u06af\u0627\u0645 \u0628\u0639\u062f\u06cc \u0627\u06cc\u0646 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f \u06a9\u0647 \u0645\u0627\u0631 \u0631\u0627 \u0628\u0647 \u062d\u0631\u06a9\u062a \u062f\u0631 \u0628\u06cc\u0627\u0648\u0631\u06cc\u0645. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"font-size:18px\">\u06f4. \u062d\u0631\u06a9\u062a \u062f\u0627\u062f\u0646 \u0645\u0627\u0631<\/h3>\n\n\n\n<p>\u0628\u0631\u0627\u06cc \u0628\u0647 \u062d\u0631\u06a9\u062a \u062f\u0631 \u0622\u0648\u0631\u062f\u0646 \u0645\u0627\u0631 \u0628\u0627\u06cc\u062f \u0627\u0632 \u0631\u0648\u06cc\u062f\u0627\u062f\u0647\u0627\u06cc \u0645\u0648\u062c\u0648\u062f \u062f\u0631 \u06a9\u0644\u0627\u0633 KEYDOWN \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645. \u0631\u0648\u06cc\u062f\u0627\u062f\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u0627\u06cc\u0646\u062c\u0627 \u0628\u0647 \u06a9\u0627\u0631 \u0645\u06cc \u06af\u06cc\u0631\u06cc\u0645 K_LEFT \u060cK_UP \u060cK_DOWN \u0648 K_RIGHT \u062e\u0648\u0627\u0647\u0646\u062f \u0628\u0648\u062f \u062a\u0627 \u0628\u062a\u0648\u0627\u0646\u06cc\u0645 \u0645\u0627\u0631 \u0631\u0627 \u0628\u0647 \u062a\u0631\u062a\u06cc\u0628 \u0628\u0647 \u062c\u0647\u0627\u062a \u067e\u0627\u06cc\u06cc\u0646\u060c \u0628\u0627\u0644\u0627\u060c \u0686\u067e \u0648 \u0631\u0627\u0633\u062a \u0647\u062f\u0627\u06cc\u062a \u06a9\u0646\u06cc\u0645. \u0646\u0627\u06af\u0641\u062a\u0647 \u0646\u0645\u0627\u0646\u062f \u06a9\u0647 \u0648\u0642\u062a\u06cc \u0627\u0632 \u0645\u062a\u062f ()fill \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645\u060c \u0631\u0646\u06af \u0635\u0641\u062d\u0647 \u0627\u0632 \u0645\u0634\u06a9\u06cc \u0628\u0647 \u0633\u0641\u06cc\u062f \u062a\u063a\u06cc\u06cc\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f. <\/p>\n\n\n\n<p>\u0645\u062a\u063a\u06cc\u0631\u0647\u0627\u06cc \u062c\u062f\u06cc\u062f\u06cc \u0628\u0647 \u0646\u0627\u0645\u200c\u0647\u0627\u06cc x1_change \u0648 y1_change \u0647\u0645 \u0633\u0627\u062e\u062a\u0647\u200c\u0627\u06cc\u0645 \u06a9\u0647 \u0645\u062e\u062a\u0635\u0627\u062a \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc\u200c\u0634\u062f\u0647 x \u0648 y \u0631\u0627 \u062f\u0631 \u062e\u0648\u062f \u0646\u06af\u0647 \u0645\u06cc\u200c\u062f\u0627\u0631\u0646\u062f. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python line-numbers\">import pygame\n \npygame.init()\n \nwhite = (255, 255, 255)\nblack = (0, 0, 0)\nred = (255, 0, 0)\n \ndis = pygame.display.set_mode((800, 600))\npygame.display.set_caption('Snake Game by Edureka')\n \ngame_over = False\n \nx1 = 300\ny1 = 300\n \nx1_change = 0       \ny1_change = 0\n \nclock = pygame.time.Clock()\n \nwhile not game_over:\n    for event in pygame.event.get():\n        if event.type == pygame.QUIT:\n            game_over = True\n        if event.type == pygame.KEYDOWN:\n            if event.key == pygame.K_LEFT:\n                x1_change = -10\n                y1_change = 0\n            elif event.key == pygame.K_RIGHT:\n                x1_change = 10\n                y1_change = 0\n            elif event.key == pygame.K_UP:\n                y1_change = -10\n                x1_change = 0\n            elif event.key == pygame.K_DOWN:\n                y1_change = 10\n                x1_change = 0\n \n    x1 += x1_change\n    y1 += y1_change\n    dis.fill(white)\n    pygame.draw.rect(dis, black, [x1, y1, 10, 10])\n \n    pygame.display.update()\n \n    clock.tick(30)\n \npygame.quit()\nquit()<\/code><\/pre>\n\n\n\n<p><strong>\u062e\u0631\u0648\u062c\u06cc<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"657\" src=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/no-point.gif\" alt=\"\u062d\u0631\u06a9\u062a \u062f\u0627\u062f\u0646 \u0645\u0627\u0631\" class=\"wp-image-43674\"\/><\/figure>\n<\/div>\n\n\n<div style=\"height:19px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"font-size:18px\">\u06f5. \u0627\u062a\u0645\u0627\u0645 \u0628\u0627\u0632\u06cc \u0628\u0627 \u0628\u0631\u062e\u0648\u0631\u062f \u0645\u0627\u0631 \u0628\u0647 \u0644\u0628\u0647\u200c\u0647\u0627\u06cc \u0635\u0641\u062d\u0647<\/h3>\n\n\n\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0628\u0627\u0632\u06cc Snake \u0627\u06af\u0631 \u0628\u0627\u0632\u06cc\u06a9\u0646 \u0628\u0647 \u0644\u0628\u0647\u200c\u0647\u0627\u06cc \u0635\u0641\u062d\u0647 \u0628\u0631\u062e\u0648\u0631\u062f \u06a9\u0646\u062f\u060c \u0645\u06cc\u200c\u0628\u0627\u0632\u062f. \u0628\u0631\u0627\u06cc \u067e\u06cc\u0627\u062f\u0647\u200c\u0633\u0627\u0632\u06cc \u0627\u06cc\u0646 \u0642\u0627\u0646\u0648\u0646 \u0627\u0632 Statement \u06cc\u0627 \u0628\u06cc\u0627\u0646\u06cc\u0647 \u00abif\u00bb \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0628\u0631\u0627\u0633\u0627\u0633 \u0622\u0646\u060c \u0645\u062e\u062a\u0635\u0627\u062a x \u0648 y \u0645\u0627\u0631 \u0628\u0627\u06cc\u062f \u06a9\u0645\u062a\u0631 \u0627\u0632 \u0645\u062e\u062a\u0635\u0627\u062a \u062a\u0645\u0627\u0645 \u0635\u0641\u062d\u0647 \u06cc\u0627 \u0645\u0633\u0627\u0648\u06cc \u0628\u0627 \u0622\u0646 \u0628\u0627\u0634\u062f. \u062a\u0648\u062c\u0647 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u0628\u0647 \u062c\u0627\u06cc \u06a9\u062f\u0647\u0627\u06cc \u0633\u062e\u062a\u060c \u0627\u0632 \u0645\u062a\u063a\u06cc\u0631\u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u062a\u0627 \u0628\u0639\u062f\u0627 \u0628\u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u0644\u0627\u0632\u0645 \u0631\u0627 \u0628\u0647 \u0622\u0633\u0627\u0646\u06cc \u062f\u0631 \u0628\u0627\u0632\u06cc \u062e\u0648\u062f \u067e\u06cc\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python line-numbers\">import pygame\nimport time\npygame.init()\n \nwhite = (255, 255, 255)\nblack = (0, 0, 0)\nred = (255, 0, 0)\n \ndis_width = 800\ndis_height  = 600\ndis = pygame.display.set_mode((dis_width, dis_width))\npygame.display.set_caption('Snake Game by Edureka')\n \ngame_over = False\n \nx1 = dis_width\/2\ny1 = dis_height\/2\n \nsnake_block=10\n \nx1_change = 0\ny1_change = 0\n \nclock = pygame.time.Clock()\nsnake_speed=30\n \nfont_style = pygame.font.SysFont(None, 50)\n \ndef message(msg,color):\n    mesg = font_style.render(msg, True, color)\n    dis.blit(mesg, [dis_width\/2, dis_height\/2])\n \nwhile not game_over:\n    for event in pygame.event.get():\n        if event.type == pygame.QUIT:\n            game_over = True\n        if event.type == pygame.KEYDOWN:\n            if event.key == pygame.K_LEFT:\n                x1_change = -snake_block\n                y1_change = 0\n            elif event.key == pygame.K_RIGHT:\n                x1_change = snake_block\n                y1_change = 0\n            elif event.key == pygame.K_UP:\n                y1_change = -snake_block\n                x1_change = 0\n            elif event.key == pygame.K_DOWN:\n                y1_change = snake_block\n                x1_change = 0\n \n    if x1 &amp;amp;gt;= dis_width or x1 &amp;amp;lt; 0 or y1 &amp;amp;gt;= dis_height or y1 &amp;amp;lt; 0:\n        game_over = True\n \n    x1 += x1_change\n    y1 += y1_change\n    dis.fill(white)\n    pygame.draw.rect(dis, black, [x1, y1, snake_block, snake_block])\n \n    pygame.display.update()\n \n    clock.tick(snake_speed)\n \nmessage(\"You lost\",red)\npygame.display.update()\ntime.sleep(2)\n \npygame.quit()\nquit()<\/code><\/pre>\n\n\n\n<p><strong>\u062e\u0631\u0648\u062c\u06cc<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"338\" src=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/boundries-Edureka.jpg\" alt=\"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646\" class=\"wp-image-43669\" srcset=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/boundries-Edureka.jpg 600w, https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/boundries-Edureka-300x169.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\" style=\"font-size:18px\">\u06f6. \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u063a\u0630\u0627<\/h3>\n\n\n\n<p>\u062f\u0631 \u0645\u0631\u062d\u0644\u0647 \u0628\u0639\u062f\u06cc \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u063a\u0630\u0627 \u0631\u0627 \u0647\u0645 \u0628\u0647 \u0635\u0641\u062d\u0647 \u0627\u0636\u0627\u0641\u0647 \u0648 \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0645\u0627\u0631 \u0647\u0631 \u0628\u0627\u0631 \u06a9\u0647 \u063a\u0630\u0627 \u0645\u06cc\u200c\u062e\u0648\u0631\u062f\u060c \u067e\u06cc\u0627\u0645\u06cc (\u0645\u062b\u0644\u0627 !Yummy) \u0628\u0647 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0631\u0622\u06cc\u062f. \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a\u06cc \u06a9\u0648\u0686\u06a9 \u0647\u0645 \u062f\u0631 \u06a9\u062f \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u062a\u0627 \u0628\u0631\u0627\u06cc \u0645\u062b\u0627\u0644 \u0628\u0627\u0632\u06cc\u06a9\u0646 \u06af\u0632\u06cc\u0646\u0647\u200c\u0627\u06cc \u0628\u0631\u0627\u06cc \u062e\u0631\u0648\u062c \u0627\u0632 \u0628\u0627\u0632\u06cc\u060c \u06cc\u0627 \u0628\u0627\u0632\u06cc \u06a9\u0631\u062f\u0646 \u062f\u0648\u0628\u0627\u0631\u0647 \u0628\u0639\u062f \u0627\u0632 \u0647\u0631 \u0634\u06a9\u0633\u062a \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python line-numbers\">import pygame\nimport time\nimport random\n \npygame.init()\n \nwhite = (255, 255, 255)\nblack = (0, 0, 0)\nred = (255, 0, 0)\nblue = (0, 0, 255)\n \ndis_width = 800\ndis_height = 600\n \ndis = pygame.display.set_mode((dis_width, dis_height))\npygame.display.set_caption('Snake Game by Edureka')\n \nclock = pygame.time.Clock()\n \nsnake_block = 10\nsnake_speed = 30\n \nfont_style = pygame.font.SysFont(None, 30)\n \n \ndef message(msg, color):\n    mesg = font_style.render(msg, True, color)\n    dis.blit(mesg, [dis_width\/3, dis_height\/3])\n \n \ndef gameLoop():  # creating a function\n    game_over = False\n    game_close = False\n \n    x1 = dis_width \/ 2\n    y1 = dis_height \/ 2\n \n    x1_change = 0\n    y1_change = 0\n \n    foodx = round(random.randrange(0, dis_width - snake_block) \/ 10.0) * 10.0\n    foody = round(random.randrange(0, dis_width - snake_block) \/ 10.0) * 10.0\n \n    while not game_over:\n \n        while game_close == True:\n            dis.fill(white)\n            message(\"You Lost! Press Q-Quit or C-Play Again\", red)\n            pygame.display.update()\n \n            for event in pygame.event.get():\n                if event.type == pygame.KEYDOWN:\n                    if event.key == pygame.K_q:\n                        game_over = True\n                        game_close = False\n                    if event.key == pygame.K_c:\n                        gameLoop()\n \n        for event in pygame.event.get():\n            if event.type == pygame.QUIT:\n                game_over = True\n            if event.type == pygame.KEYDOWN:\n                if event.key == pygame.K_LEFT:\n                    x1_change = -snake_block\n                    y1_change = 0\n                elif event.key == pygame.K_RIGHT:\n                    x1_change = snake_block\n                    y1_change = 0\n                elif event.key == pygame.K_UP:\n                    y1_change = -snake_block\n                    x1_change = 0\n                elif event.key == pygame.K_DOWN:\n                    y1_change = snake_block\n                    x1_change = 0\n \n        if x1 &amp;amp;gt;= dis_width or x1 &amp;amp;lt; 0 or y1 &amp;amp;gt;= dis_height or y1 &amp;amp;lt; 0:\n            game_close = True\n \n        x1 += x1_change\n        y1 += y1_change\n        dis.fill(white)\n        pygame.draw.rect(dis, blue, [foodx, foody, snake_block, snake_block])\n        pygame.draw.rect(dis, black, [x1, y1, snake_block, snake_block])\n        pygame.display.update()\n \n        if x1 == foodx and y1 == foody:\n            print(\"Yummy!!\")\n        clock.tick(snake_speed)\n \n    pygame.quit()\n    quit()\n \n \ngameLoop()<\/code><\/pre>\n\n\n\n<p><strong>\u062e\u0631\u0648\u062c\u06cc<\/strong>: <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"404\" height=\"334\" src=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/Adding-the-food-Snake-Game-in-python-Edureka.jpg\" alt=\"\u0627\u0641\u0632\u0648\u062f\u0646 \u063a\u0630\u0627 \u0628\u0647 \u0645\u062d\u06cc\u0637 \u0628\u0627\u0632\u06cc\" class=\"wp-image-43668\" srcset=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/Adding-the-food-Snake-Game-in-python-Edureka.jpg 404w, https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/Adding-the-food-Snake-Game-in-python-Edureka-300x248.jpg 300w\" sizes=\"auto, (max-width: 404px) 100vw, 404px\" \/><\/figure>\n<\/div>\n\n\n<div style=\"height:19px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"font-size:18px\">\u06f7. \u0627\u0641\u0632\u0627\u06cc\u0634 \u0637\u0648\u0644 \u0645\u0627\u0631<\/h3>\n\n\n\n<p>\u06a9\u062f\u06cc \u06a9\u0647 \u062f\u0631 \u067e\u0627\u06cc\u06cc\u0646 \u0622\u0648\u0631\u062f\u0647\u200c\u0627\u06cc\u0645 \u0628\u0627\u0639\u062b \u0645\u06cc\u200c\u0634\u0648\u062f \u0647\u0631 \u0628\u0627\u0631 \u06a9\u0647 \u063a\u0630\u0627 \u0645\u06cc\u200c\u062e\u0648\u0631\u06cc\u062f\u060c \u0645\u0627\u0631 \u0628\u0647 \u0627\u0646\u062f\u0627\u0632\u0647 \u06cc\u06a9 \u0645\u0631\u0628\u0639 \u062f\u0631\u0627\u0632\u062a\u0631 \u0634\u0648\u062f. \u0639\u0644\u0627\u0648\u0647 \u0628\u0631 \u0627\u06cc\u0646\u060c \u0627\u06af\u0631 \u0645\u0627\u0631 \u0628\u0627 \u0628\u062f\u0646 \u062e\u0648\u062f\u0634 \u0628\u0631\u062e\u0648\u0631\u062f \u06a9\u0646\u062f \u0646\u06cc\u0632 \u0628\u0627\u0632\u06cc \u0628\u0647 \u067e\u0627\u06cc\u0627\u0646 \u0645\u06cc\u200c\u0631\u0633\u062f \u0648 \u067e\u06cc\u0627\u0645 \u00abYou Lost! Press Q-Quit or C-Play Again\u00bb \u0628\u0647 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0631\u0645\u06cc\u200c\u0622\u06cc\u062f. \u0627\u0633\u0627\u0633\u0627 \u062f\u0631\u0627\u0632\u0627\u06cc \u0645\u0627\u0631 \u0631\u0627 \u062f\u0631\u0648\u0646 \u06cc\u06a9 \u0641\u0647\u0631\u0633\u062a \u0646\u06af\u0647 \u0645\u06cc\u200c\u062f\u0627\u0631\u06cc\u0645 \u0648 \u0627\u0628\u0639\u0627\u062f \u0627\u0648\u0644\u06cc\u0647\u200c\u0627\u06cc \u06a9\u0647 \u0628\u0631\u0627\u06cc\u0634 \u062a\u0639\u0631\u06cc\u0641 \u06a9\u0631\u062f\u0647\u200c\u0627\u06cc\u0645 \u0647\u0645 \u062a\u0646\u0647\u0627 \u06cc\u06a9 \u0628\u0644\u0648\u06a9 \u0627\u0633\u062a.  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python line-numbers\">import pygame\nimport time\nimport random\n \npygame.init()\n \nwhite = (255, 255, 255)\nyellow = (255, 255, 102)\nblack = (0, 0, 0)\nred = (213, 50, 80)\ngreen = (0, 255, 0)\nblue = (50, 153, 213)\n \ndis_width = 600\ndis_height = 400\n \ndis = pygame.display.set_mode((dis_width, dis_height))\npygame.display.set_caption('Snake Game by Edureka')\n \nclock = pygame.time.Clock()\n \nsnake_block = 10\nsnake_speed = 15\n \nfont_style = pygame.font.SysFont(\"bahnschrift\", 25)\nscore_font = pygame.font.SysFont(\"comicsansms\", 35)\n \ndef our_snake(snake_block, snake_list):\n    for x in snake_list:\n        pygame.draw.rect(dis, black, [x[0], x[1], snake_block, snake_block])\n \n \ndef message(msg, color):\n    mesg = font_style.render(msg, True, color)\n    dis.blit(mesg, [dis_width \/ 6, dis_height \/ 3])\n \n \ndef gameLoop():\n    game_over = False\n    game_close = False\n \n    x1 = dis_width \/ 2\n    y1 = dis_height \/ 2\n \n    x1_change = 0\n    y1_change = 0\n \n    snake_List = []\n    Length_of_snake = 1\n \n    foodx = round(random.randrange(0, dis_width - snake_block) \/ 10.0) * 10.0\n    foody = round(random.randrange(0, dis_height - snake_block) \/ 10.0) * 10.0\n \n    while not game_over:\n \n        while game_close == True:\n            dis.fill(blue)\n            message(\"You Lost! Press C-Play Again or Q-Quit\", red)\n \n            pygame.display.update()\n \n            for event in pygame.event.get():\n                if event.type == pygame.KEYDOWN:\n                    if event.key == pygame.K_q:\n                        game_over = True\n                        game_close = False\n                    if event.key == pygame.K_c:\n                        gameLoop()\n \n        for event in pygame.event.get():\n            if event.type == pygame.QUIT:\n                game_over = True\n            if event.type == pygame.KEYDOWN:\n                if event.key == pygame.K_LEFT:\n                    x1_change = -snake_block\n                    y1_change = 0\n                elif event.key == pygame.K_RIGHT:\n                    x1_change = snake_block\n                    y1_change = 0\n                elif event.key == pygame.K_UP:\n                    y1_change = -snake_block\n                    x1_change = 0\n                elif event.key == pygame.K_DOWN:\n                    y1_change = snake_block\n                    x1_change = 0\n \n        if x1 &amp;amp;gt;= dis_width or x1 &amp;amp;lt; 0 or y1 &amp;amp;gt;= dis_height or y1 &amp;amp;lt; 0:\n            game_close = True\n        x1 += x1_change\n        y1 += y1_change\n        dis.fill(blue)\n        pygame.draw.rect(dis, green, [foodx, foody, snake_block, snake_block])\n        snake_Head = []\n        snake_Head.append(x1)\n        snake_Head.append(y1)\n        snake_List.append(snake_Head)\n        if len(snake_List) &amp;amp;gt; Length_of_snake:\n            del snake_List[0]\n \n        for x in snake_List[:-1]:\n            if x == snake_Head:\n                game_close = True\n \n        our_snake(snake_block, snake_List)\n \n \n        pygame.display.update()\n \n        if x1 == foodx and y1 == foody:\n            foodx = round(random.randrange(0, dis_width - snake_block) \/ 10.0) * 10.0\n            foody = round(random.randrange(0, dis_height - snake_block) \/ 10.0) * 10.0\n            Length_of_snake += 1\n \n        clock.tick(snake_speed)\n \n    pygame.quit()\n    quit()\n \n \ngameLoop()<\/code><\/pre>\n\n\n\n<p><strong>\u062e\u0631\u0648\u062c\u06cc<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"657\" src=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/point-1.gif\" alt=\"\u062d\u0631\u06a9\u062a \u062f\u0627\u062f\u0646 \u0645\u0627\u0631 \u062f\u0631 \u0645\u062d\u06cc\u0637\" class=\"wp-image-43673\"\/><\/figure>\n<\/div>\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" style=\"font-size:18px\">\u06f8. \u0646\u0645\u0627\u06cc\u0634 \u0627\u0645\u062a\u06cc\u0627\u0632<\/h3>\n\n\n\n<p>\u0648 \u062f\u0631 \u0646\u0647\u0627\u06cc\u062a \u0646\u0648\u0628\u062a \u0628\u0647 \u0646\u0645\u0627\u06cc\u0634 \u0627\u0645\u062a\u06cc\u0627\u0632 \u0628\u0627\u0632\u06cc\u06a9\u0646 \u0645\u06cc\u200c\u0631\u0633\u062f. \u0628\u0631\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u0627\u06cc\u0646 \u0648\u06cc\u0698\u06af\u06cc\u060c \u062a\u0627\u0628\u0639\u06cc \u062c\u062f\u06cc\u062f \u0628\u0647 \u0646\u0627\u0645 \u00abYour_score\u00bb \u0633\u0627\u062e\u062a\u0647\u200c\u0627\u06cc\u0645. \u0627\u06cc\u0646 \u062a\u0627\u0628\u0639\u060c \u0637\u0648\u0644 \u0645\u0627\u0631 \u0631\u0627 \u062a\u0642\u0633\u06cc\u0645 \u0628\u0631 \u06f1 \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f\u060c \u0686\u0648\u0646 \u06f1 \u0631\u0627 \u0627\u0646\u062f\u0627\u0632\u0647 \u0627\u0648\u0644\u06cc\u0647 \u0645\u0627\u0631 \u062a\u0639\u0631\u06cc\u0641 \u06a9\u0631\u062f\u0647\u200c\u0627\u06cc\u0645. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python line-numbers\">import pygame\nimport time\nimport random\n \npygame.init()\n \nwhite = (255, 255, 255)\nyellow = (255, 255, 102)\nblack = (0, 0, 0)\nred = (213, 50, 80)\ngreen = (0, 255, 0)\nblue = (50, 153, 213)\n \ndis_width = 600\ndis_height = 400\n \ndis = pygame.display.set_mode((dis_width, dis_height))\npygame.display.set_caption('Snake Game by Edureka')\n \nclock = pygame.time.Clock()\n \nsnake_block = 10\nsnake_speed = 15\n \nfont_style = pygame.font.SysFont(\"bahnschrift\", 25)\nscore_font = pygame.font.SysFont(\"comicsansms\", 35)\n \n \ndef Your_score(score):\n    value = score_font.render(\"Your Score: \" + str(score), True, yellow)\n    dis.blit(value, [0, 0])\n \n \n \ndef our_snake(snake_block, snake_list):\n    for x in snake_list:\n        pygame.draw.rect(dis, black, [x[0], x[1], snake_block, snake_block])\n \n \ndef message(msg, color):\n    mesg = font_style.render(msg, True, color)\n    dis.blit(mesg, [dis_width \/ 6, dis_height \/ 3])\n \n \ndef gameLoop():\n    game_over = False\n    game_close = False\n \n    x1 = dis_width \/ 2\n    y1 = dis_height \/ 2\n \n    x1_change = 0\n    y1_change = 0\n \n    snake_List = []\n    Length_of_snake = 1\n \n    foodx = round(random.randrange(0, dis_width - snake_block) \/ 10.0) * 10.0\n    foody = round(random.randrange(0, dis_height - snake_block) \/ 10.0) * 10.0\n \n    while not game_over:\n \n        while game_close == True:\n            dis.fill(blue)\n            message(\"You Lost! Press C-Play Again or Q-Quit\", red)\n            Your_score(Length_of_snake - 1)\n            pygame.display.update()\n \n            for event in pygame.event.get():\n                if event.type == pygame.KEYDOWN:\n                    if event.key == pygame.K_q:\n                        game_over = True\n                        game_close = False\n                    if event.key == pygame.K_c:\n                        gameLoop()\n \n        for event in pygame.event.get():\n            if event.type == pygame.QUIT:\n                game_over = True\n            if event.type == pygame.KEYDOWN:\n                if event.key == pygame.K_LEFT:\n                    x1_change = -snake_block\n                    y1_change = 0\n                elif event.key == pygame.K_RIGHT:\n                    x1_change = snake_block\n                    y1_change = 0\n                elif event.key == pygame.K_UP:\n                    y1_change = -snake_block\n                    x1_change = 0\n                elif event.key == pygame.K_DOWN:\n                    y1_change = snake_block\n                    x1_change = 0\n \n        if x1 &amp;amp;gt;= dis_width or x1 &amp;amp;lt; 0 or y1 &amp;amp;gt;= dis_height or y1 &amp;amp;lt; 0:\n            game_close = True\n        x1 += x1_change\n        y1 += y1_change\n        dis.fill(blue)\n        pygame.draw.rect(dis, green, [foodx, foody, snake_block, snake_block])\n        snake_Head = []\n        snake_Head.append(x1)\n        snake_Head.append(y1)\n        snake_List.append(snake_Head)\n        if len(snake_List) &amp;amp;gt; Length_of_snake:\n            del snake_List[0]\n \n        for x in snake_List[:-1]:\n            if x == snake_Head:\n                game_close = True\n \n        our_snake(snake_block, snake_List)\n        Your_score(Length_of_snake - 1)\n \n        pygame.display.update()\n \n        if x1 == foodx and y1 == foody:\n            foodx = round(random.randrange(0, dis_width - snake_block) \/ 10.0) * 10.0\n            foody = round(random.randrange(0, dis_height - snake_block) \/ 10.0) * 10.0\n            Length_of_snake += 1\n \n        clock.tick(snake_speed)\n \n    pygame.quit()\n    quit()\n \n \ngameLoop()<\/code><\/pre>\n\n\n\n<p><strong>\u062e\u0631\u0648\u062c\u06cc<\/strong>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"432\" src=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/final-screen-snake-game-Edureka.jpg\" alt=\"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646\" class=\"wp-image-43667\" srcset=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/final-screen-snake-game-Edureka.jpg 600w, https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/final-screen-snake-game-Edureka-300x216.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n<\/div>\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:20px\">\u0686\u0646\u062f \u0627\u06cc\u062f\u0647 \u0628\u0631\u0627\u06cc \u062a\u06a9\u0645\u06cc\u0644 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646<\/h2>\n\n\n\n<p>\u062f\u0631 \u062d\u0627\u0644 \u062d\u0627\u0636\u0631 \u06cc\u06a9 \u0628\u0627\u0632\u06cc Snake \u06a9\u0627\u0645\u0644 \u062f\u0627\u0631\u06cc\u0645\u060c \u0627\u0645\u0627 \u0627\u06af\u0631 \u062f\u0648\u0633\u062a \u062f\u0627\u0634\u062a\u06cc\u062f \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0648\u06cc\u0698\u06af\u06cc\u200c\u0647\u0627\u06cc \u062f\u06cc\u06af\u0631\u06cc \u0647\u0645 \u0628\u0647 \u0622\u0646 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0633\u0631\u06af\u0631\u0645\u200c\u06a9\u0646\u0646\u062f\u0647\u200c\u062a\u0631 \u0634\u0648\u062f. \u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u0686\u0646\u062f \u067e\u06cc\u0634\u0646\u0647\u0627\u062f \u0628\u0631\u0627\u06cc\u062a\u0627\u0646 \u062f\u0627\u0631\u06cc\u0645:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0645\u0631\u0627\u062d\u0644 \u0645\u062e\u062a\u0644\u0641\u06cc \u0628\u0633\u0627\u0632\u06cc\u062f \u0648 \u0645\u06cc\u0632\u0627\u0646 \u0686\u0627\u0644\u0634 \u0631\u0627 \u0628\u0647 \u0645\u0631\u0648\u0631 \u0627\u0641\u0632\u0627\u06cc\u0634 \u062f\u0647\u06cc\u062f<\/strong>: \u0647\u0645\u06cc\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0645\u0631\u0627\u062d\u0644 \u0628\u0627\u0632\u06cc \u067e\u06cc\u0634 \u0645\u06cc\u200c\u0631\u0648\u0646\u062f\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u0648\u0627\u0646\u0639\u06cc \u0628\u0647 \u0635\u0641\u062d\u0647 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f \u06cc\u0627 \u0633\u0631\u0639\u062a \u062d\u0631\u06a9\u062a \u0645\u0627\u0631 \u0631\u0627 \u0627\u0641\u0632\u0627\u06cc\u0634 \u062f\u0647\u06cc\u062f. <\/li>\n\n\n\n<li><strong>Power-Up \u0637\u0631\u0627\u062d\u06cc \u06a9\u0646\u06cc\u062f<\/strong>: \u067e\u0627\u0648\u0631 \u0622\u067e \u0628\u0647 \u0645\u0639\u0646\u06cc \u062a\u0648\u0627\u0646\u0627\u06cc\u06cc\u200c\u0647\u0627\u06cc \u0645\u0648\u0642\u062a\u06cc \u0627\u0645\u0627 \u0627\u0631\u0632\u0634\u0645\u0646\u062f \u0628\u0631\u0627\u06cc \u0628\u0627\u0632\u06cc\u06a9\u0646 \u0627\u0633\u062a\u060c \u0645\u062b\u0644\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u0627\u0631 \u0631\u0627 \u062f\u0631\u0627\u0632\u062a\u0631 \u06a9\u0646\u06cc\u062f \u06cc\u0627 \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u0627\u0632 \u0645\u06cc\u0627\u0646 \u062f\u06cc\u0648\u0627\u0631\u0647\u0627 \u0631\u062f \u0634\u0648\u062f. <\/li>\n\n\n\n<li><strong>\u063a\u0630\u0627\u0647\u0627\u06cc \u0645\u062e\u0635\u0648\u0635<\/strong>: \u063a\u0630\u0627\u0647\u0627\u06cc\u06cc \u062e\u0627\u0635\u200c\u062a\u0631 \u0637\u0631\u0627\u062d\u06cc \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0647\u0631 \u0686\u0646\u062f \u0648\u0642\u062a \u06cc\u06a9\u200c\u0628\u0627\u0631 \u0638\u0627\u0647\u0631 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0648 \u0628\u0631\u0627\u06cc \u0645\u062b\u0627\u0644 \u0627\u0645\u062a\u06cc\u0627\u0632\u06cc \u0627\u0636\u0627\u0641\u0647 \u06cc\u0627 \u0642\u062f\u0631\u062a\u06cc \u0628\u0647\u200c\u062e\u0635\u0648\u0635 \u0628\u0647 \u0628\u0627\u0632\u06cc\u06a9\u0646 \u0645\u06cc\u200c\u062f\u0647\u0646\u062f. <\/li>\n\n\n\n<li><strong>\u067e\u0627\u06cc\u0634 \u0628\u0627\u0644\u0627\u062a\u0631\u06cc\u0646 \u0627\u0645\u062a\u06cc\u0627\u0632\u0647\u0627<\/strong>: \u0631\u0627\u0647\u06cc \u0628\u0631\u0627\u06cc \u067e\u0627\u06cc\u0634 \u0627\u0645\u062a\u06cc\u0627\u0632\u0647\u0627 \u0648 \u0631\u062f\u0647\u200c\u0628\u0646\u062f\u06cc \u0622\u0646\u200c\u0647\u0627 \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f. \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0645\u062a\u06cc\u0627\u0632\u0647\u0627 \u0631\u0627 \u062f\u0631\u0648\u0646 \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u06cc\u0627 \u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u0646\u06af\u0647 \u062f\u0627\u0631\u06cc\u062f \u0648 \u0628\u0647 \u062a\u0631\u062a\u06cc\u0628\u200c\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0646\u0634\u0627\u0646 \u062f\u0647\u06cc\u062f. <\/li>\n\n\n\n<li><strong>\u0627\u0641\u06a9\u062a \u0635\u0648\u062a\u06cc \u0648 \u0645\u0648\u0633\u06cc\u0642\u06cc<\/strong>: \u0628\u0631\u0627\u06cc \u0648\u0642\u0627\u06cc\u0639 \u0628\u0627\u0632\u06cc &#8211; \u0645\u062b\u0644\u0627 \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u063a\u0630\u0627 \u0645\u06cc\u200c\u062e\u0648\u0631\u06cc\u062f\u060c \u0628\u0627 \u0628\u062f\u0646\u200c \u062e\u0648\u062f\u062a\u0627\u0646 \u0628\u0631\u062e\u0648\u0631\u062f \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f \u06cc\u0627 \u0645\u0631\u062d\u0644\u0647 \u0631\u0627 \u0628\u0647 \u0627\u062a\u0645\u0627\u0645 \u0645\u06cc\u200c\u0631\u0633\u0627\u0646\u06cc\u062f &#8211; \u0627\u0641\u06a9\u062a \u0635\u0648\u062a\u06cc \u062f\u0631 \u0646\u0638\u0631 \u0628\u06af\u06cc\u0631\u06cc\u062f. \u0645\u0648\u0633\u06cc\u0642\u06cc \u067e\u0633\u200c\u0632\u0645\u06cc\u0646\u0647 \u0647\u0645 \u0628\u0627\u0632\u06cc \u0631\u0627 \u0644\u0630\u062a\u200c\u0628\u062e\u0634\u200c\u062a\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f. <\/li>\n\n\n\n<li><strong>\u06af\u0632\u06cc\u0646\u0647\u200c\u0647\u0627\u06cc \u0633\u0641\u0627\u0631\u0634\u06cc<\/strong>: \u0628\u0647 \u0628\u0627\u0632\u06cc\u06a9\u0646 \u0627\u062c\u0627\u0632\u0647 \u062f\u0647\u06cc\u062f \u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u06af\u0648\u0646\u0627\u06af\u0648\u0646 \u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u062f\u060c \u0645\u062b\u0644\u0627 \u0633\u0631\u0639\u062a \u0645\u0627\u0631\u060c \u0627\u0628\u0639\u0627\u062f \u0635\u0641\u062d\u0647 \u0648 \u0631\u0646\u06af\u200c\u0628\u0646\u062f\u06cc\u200c\u0647\u0627. <\/li>\n\n\n\n<li><strong>\u062d\u0627\u0644\u062a \u062f\u0648 \u0646\u0641\u0631\u0647<\/strong>: \u062d\u0627\u0644\u062a\u06cc \u0628\u0633\u0627\u0632\u06cc\u062f \u06a9\u0647 \u062f\u0631 \u0622\u0646 \u062f\u0648 \u0646\u0641\u0631 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0646\u062f \u0631\u0648\u06cc \u0635\u0641\u062d\u0647\u200c\u0627\u06cc \u0648\u0627\u062d\u062f \u0628\u0627 \u06cc\u06a9\u062f\u06cc\u06af\u0631 \u0628\u0627\u0632\u06cc \u06a9\u0646\u0646\u062f \u0648 \u0647\u0631\u06a9\u062f\u0627\u0645\u060c \u06a9\u0646\u062a\u0631\u0644 \u0645\u0627\u0631\u06cc \u0645\u062c\u0632\u0627 \u0631\u0627 \u0628\u0631\u0639\u0647\u062f\u0647 \u0628\u06af\u06cc\u0631\u0646\u062f. <\/li>\n\n\n\n<li><strong>\u0627\u0646\u06cc\u0645\u06cc\u0634\u0646 Game Over<\/strong>:\u200c \u0628\u0627 \u0627\u0646\u06cc\u0645\u06cc\u0634\u0646\u200c\u0647\u0627 \u0648 \u0627\u0641\u06a9\u062a\u200c\u0647\u0627\u06cc \u0628\u0635\u0631\u06cc \u0645\u062e\u062a\u0644\u0641 \u0645\u062b\u0644 \u0627\u0646\u0641\u062c\u0627\u0631 \u06cc\u0627 \u0635\u0641\u062d\u0647\u200c\u0627\u06cc \u06a9\u0647 \u0627\u0645\u062a\u06cc\u0627\u0632 \u0646\u0647\u0627\u06cc\u06cc \u0631\u0627 \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f\u060c \u067e\u0627\u06cc\u0627\u0646 \u0628\u0627\u0632\u06cc \u0631\u0627 \u0627\u0639\u0644\u0627\u0645 \u06a9\u0646\u06cc\u062f. <\/li>\n\n\n\n<li><strong>\u0686\u0627\u0644\u0634\u200c\u0647\u0627\u06cc \u0627\u0636\u0627\u0641\u0647<\/strong>: \u0686\u0627\u0644\u0634\u200c\u0647\u0627 \u0648 \u0645\u06cc\u0646\u06cc\u200c\u06af\u06cc\u0645\u200c\u0647\u0627\u06cc\u06cc \u0628\u0647 \u0628\u0627\u0632\u06cc \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0628\u0627\u0632\u06cc\u06a9\u0646 \u0628\u0627 \u0631\u0633\u06cc\u062f\u06af\u06cc \u0628\u0647 \u0622\u0646\u200c\u0647\u0627\u060c \u0627\u0645\u062a\u06cc\u0627\u0632 \u0628\u06cc\u0634\u062a\u0631\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc\u200c\u06a9\u0646\u062f. <\/li>\n\n\n\n<li><strong>\u0646\u0633\u062e\u0647 \u0645\u0648\u0628\u0627\u06cc\u0644<\/strong>: \u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u0648 \u0633\u0627\u062e\u062a\u0627\u0631 \u0628\u0627\u0632\u06cc \u0631\u0627 \u0628\u0647\u200c\u06af\u0648\u0646\u0647\u200c\u0627\u06cc \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f \u06a9\u0647 \u06a9\u0627\u0645\u0644\u0627 \u0628\u0627 \u0646\u0645\u0627\u06cc\u0634\u06af\u0631\u0647\u0627\u06cc \u0644\u0645\u0633\u06cc \u0633\u0627\u0632\u06af\u0627\u0631 \u0628\u0627\u0634\u062f. <\/li>\n<\/ul>\n\n\n\n<p>+ \u0645\u0646\u0628\u0639: <a href=\"https:\/\/www.edureka.co\/blog\/snake-game-with-pygame\/\" target=\"_blank\" rel=\"noreferrer noopener\">Edureka<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u062a\u0642\u0631\u06cc\u0628\u0627 \u0647\u06cc\u0686\u200c\u06a9\u0633\u06cc \u0646\u06cc\u0633\u062a \u06a9\u0647 \u0628\u0627\u0632\u06cc \u0645\u0639\u0631\u0648\u0641 \u00ab\u0645\u0627\u0631\u00bb \u06cc\u0627 \u00abSnake\u00bb \u0631\u0627 \u062a\u062c\u0631\u0628\u0647 \u0646\u06a9\u0631\u062f\u0647 \u0628\u0627\u0634\u062f. \u0627\u06cc\u0646 \u0628\u0627\u0632\u06cc \u06a9\u0644\u0627\u0633\u06cc\u06a9 \u0633\u0627\u062e\u062a\u0627\u0631\u06cc \u0628\u0633\u06cc\u0627\u0631 \u0633\u0627\u062f\u0647 \u062f\u0627\u0631\u062f\u060c&#8230;<\/p>\n","protected":false},"author":49,"featured_media":43665,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46,48,64,78],"tags":[],"class_list":["post-43624","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developer","category-technology","category-python","category-backend"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 - \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646 - \u06a9\u0648\u0626\u0631\u0627\u200c\u0628\u0644\u0627\u06af<\/title>\n<meta name=\"description\" content=\"\u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0633\u0627\u062f\u0647\u200c\u062a\u0631 \u0627\u0632 \u0686\u06cc\u0632\u06cc\u200c\u0633\u062a \u06a9\u0647 \u062a\u0635\u0648\u0631 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0631\u0648\u0634 \u06a9\u0627\u0631 \u0631\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 \u06a9\u062f\u0647\u0627\u06cc \u0622\u0645\u0627\u062f\u0647 \u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u062a\u0635\u0648\u06cc\u0631\u06cc \u06cc\u0627\u062f \u0645\u06cc\u200c\u06af\u06cc\u0631\u06cc\u062f.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/\" \/>\n<meta property=\"og:locale\" content=\"fa_IR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 - \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646 - \u06a9\u0648\u0626\u0631\u0627\u200c\u0628\u0644\u0627\u06af\" \/>\n<meta property=\"og:description\" content=\"\u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0633\u0627\u062f\u0647\u200c\u062a\u0631 \u0627\u0632 \u0686\u06cc\u0632\u06cc\u200c\u0633\u062a \u06a9\u0647 \u062a\u0635\u0648\u0631 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0631\u0648\u0634 \u06a9\u0627\u0631 \u0631\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 \u06a9\u062f\u0647\u0627\u06cc \u0622\u0645\u0627\u062f\u0647 \u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u062a\u0635\u0648\u06cc\u0631\u06cc \u06cc\u0627\u062f \u0645\u06cc\u200c\u06af\u06cc\u0631\u06cc\u062f.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/\" \/>\n<meta property=\"og:site_name\" content=\"\u06a9\u0648\u0626\u0631\u0627\u200c\u0628\u0644\u0627\u06af\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-19T16:00:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-21T13:29:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-game-on-nokia-phone.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u0634\u0627\u06cc\u0627\u0646 \u0636\u06cc\u0627\u06cc\u06cc\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u0634\u0627\u06cc\u0627\u0646 \u0636\u06cc\u0627\u06cc\u06cc\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 \u062f\u0642\u06cc\u0642\u0647\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/\"},\"author\":{\"name\":\"\u0634\u0627\u06cc\u0627\u0646 \u0636\u06cc\u0627\u06cc\u06cc\",\"@id\":\"https:\/\/quera.org\/blog\/#\/schema\/person\/0ee1df957de3ec63182bf55abc00a0c0\"},\"headline\":\"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 &#8211; \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646\",\"datePublished\":\"2023-09-19T16:00:58+00:00\",\"dateModified\":\"2025-04-21T13:29:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/\"},\"wordCount\":127,\"commentCount\":14,\"publisher\":{\"@id\":\"https:\/\/quera.org\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-game-on-nokia-phone.jpg\",\"articleSection\":[\"\u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u0647\",\"\u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc\",\"\u067e\u0627\u06cc\u062a\u0648\u0646\",\"\u0628\u06a9\u200c\u0627\u0646\u062f\"],\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/\",\"url\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/\",\"name\":\"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 - \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646 - \u06a9\u0648\u0626\u0631\u0627\u200c\u0628\u0644\u0627\u06af\",\"isPartOf\":{\"@id\":\"https:\/\/quera.org\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-game-on-nokia-phone.jpg\",\"datePublished\":\"2023-09-19T16:00:58+00:00\",\"dateModified\":\"2025-04-21T13:29:22+00:00\",\"description\":\"\u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0633\u0627\u062f\u0647\u200c\u062a\u0631 \u0627\u0632 \u0686\u06cc\u0632\u06cc\u200c\u0633\u062a \u06a9\u0647 \u062a\u0635\u0648\u0631 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0631\u0648\u0634 \u06a9\u0627\u0631 \u0631\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 \u06a9\u062f\u0647\u0627\u06cc \u0622\u0645\u0627\u062f\u0647 \u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u062a\u0635\u0648\u06cc\u0631\u06cc \u06cc\u0627\u062f \u0645\u06cc\u200c\u06af\u06cc\u0631\u06cc\u062f.\",\"breadcrumb\":{\"@id\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#breadcrumb\"},\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#primaryimage\",\"url\":\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-game-on-nokia-phone.jpg\",\"contentUrl\":\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-game-on-nokia-phone.jpg\",\"width\":1280,\"height\":720,\"caption\":\"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u062e\u0627\u0646\u0647\",\"item\":\"https:\/\/quera.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u0647\",\"item\":\"https:\/\/quera.org\/blog\/category\/developer\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc\",\"item\":\"https:\/\/quera.org\/blog\/category\/developer\/technology\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"\u0628\u06a9\u200c\u0627\u0646\u062f\",\"item\":\"https:\/\/quera.org\/blog\/category\/developer\/technology\/backend\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 &#8211; \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/quera.org\/blog\/#website\",\"url\":\"https:\/\/quera.org\/blog\/\",\"name\":\"\u06a9\u0648\u0626\u0631\u0627\u200c\u0628\u0644\u0627\u06af\",\"description\":\"\u0647\u0645\u0647\u200c\u0686\u06cc\u0632 \u062f\u0631\u0628\u0627\u0631\u0647 \u062f\u0646\u06cc\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc\",\"publisher\":{\"@id\":\"https:\/\/quera.org\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/quera.org\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fa-IR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/quera.org\/blog\/#organization\",\"name\":\"\u06a9\u0648\u0626\u0631\u0627\",\"url\":\"https:\/\/quera.org\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\/\/quera.org\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2022\/09\/logo-quera22-e1574766184574.png\",\"contentUrl\":\"https:\/\/quera.org\/blog\/wp-content\/uploads\/2022\/09\/logo-quera22-e1574766184574.png\",\"width\":300,\"height\":300,\"caption\":\"\u06a9\u0648\u0626\u0631\u0627\"},\"image\":{\"@id\":\"https:\/\/quera.org\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.instagram.com\/quera.ir\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/quera.org\/blog\/#\/schema\/person\/0ee1df957de3ec63182bf55abc00a0c0\",\"name\":\"\u0634\u0627\u06cc\u0627\u0646 \u0636\u06cc\u0627\u06cc\u06cc\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\/\/quera.org\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9156a1f93c9de0075e3001702ee1364102238404f7a27f194ec65dabca2a6a66?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9156a1f93c9de0075e3001702ee1364102238404f7a27f194ec65dabca2a6a66?s=96&d=mm&r=g\",\"caption\":\"\u0634\u0627\u06cc\u0627\u0646 \u0636\u06cc\u0627\u06cc\u06cc\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 - \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646 - \u06a9\u0648\u0626\u0631\u0627\u200c\u0628\u0644\u0627\u06af","description":"\u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0633\u0627\u062f\u0647\u200c\u062a\u0631 \u0627\u0632 \u0686\u06cc\u0632\u06cc\u200c\u0633\u062a \u06a9\u0647 \u062a\u0635\u0648\u0631 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0631\u0648\u0634 \u06a9\u0627\u0631 \u0631\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 \u06a9\u062f\u0647\u0627\u06cc \u0622\u0645\u0627\u062f\u0647 \u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u062a\u0635\u0648\u06cc\u0631\u06cc \u06cc\u0627\u062f \u0645\u06cc\u200c\u06af\u06cc\u0631\u06cc\u062f.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/","og_locale":"fa_IR","og_type":"article","og_title":"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 - \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646 - \u06a9\u0648\u0626\u0631\u0627\u200c\u0628\u0644\u0627\u06af","og_description":"\u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0633\u0627\u062f\u0647\u200c\u062a\u0631 \u0627\u0632 \u0686\u06cc\u0632\u06cc\u200c\u0633\u062a \u06a9\u0647 \u062a\u0635\u0648\u0631 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0631\u0648\u0634 \u06a9\u0627\u0631 \u0631\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 \u06a9\u062f\u0647\u0627\u06cc \u0622\u0645\u0627\u062f\u0647 \u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u062a\u0635\u0648\u06cc\u0631\u06cc \u06cc\u0627\u062f \u0645\u06cc\u200c\u06af\u06cc\u0631\u06cc\u062f.","og_url":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/","og_site_name":"\u06a9\u0648\u0626\u0631\u0627\u200c\u0628\u0644\u0627\u06af","article_published_time":"2023-09-19T16:00:58+00:00","article_modified_time":"2025-04-21T13:29:22+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-game-on-nokia-phone.jpg","type":"image\/jpeg"}],"author":"\u0634\u0627\u06cc\u0627\u0646 \u0636\u06cc\u0627\u06cc\u06cc","twitter_card":"summary_large_image","twitter_misc":{"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a":"\u0634\u0627\u06cc\u0627\u0646 \u0636\u06cc\u0627\u06cc\u06cc","\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646":"12 \u062f\u0642\u06cc\u0642\u0647"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#article","isPartOf":{"@id":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/"},"author":{"name":"\u0634\u0627\u06cc\u0627\u0646 \u0636\u06cc\u0627\u06cc\u06cc","@id":"https:\/\/quera.org\/blog\/#\/schema\/person\/0ee1df957de3ec63182bf55abc00a0c0"},"headline":"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 &#8211; \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646","datePublished":"2023-09-19T16:00:58+00:00","dateModified":"2025-04-21T13:29:22+00:00","mainEntityOfPage":{"@id":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/"},"wordCount":127,"commentCount":14,"publisher":{"@id":"https:\/\/quera.org\/blog\/#organization"},"image":{"@id":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-game-on-nokia-phone.jpg","articleSection":["\u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u0647","\u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc","\u067e\u0627\u06cc\u062a\u0648\u0646","\u0628\u06a9\u200c\u0627\u0646\u062f"],"inLanguage":"fa-IR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/","url":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/","name":"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 - \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646 - \u06a9\u0648\u0626\u0631\u0627\u200c\u0628\u0644\u0627\u06af","isPartOf":{"@id":"https:\/\/quera.org\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#primaryimage"},"image":{"@id":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#primaryimage"},"thumbnailUrl":"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-game-on-nokia-phone.jpg","datePublished":"2023-09-19T16:00:58+00:00","dateModified":"2025-04-21T13:29:22+00:00","description":"\u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0633\u0627\u062f\u0647\u200c\u062a\u0631 \u0627\u0632 \u0686\u06cc\u0632\u06cc\u200c\u0633\u062a \u06a9\u0647 \u062a\u0635\u0648\u0631 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647 \u0631\u0648\u0634 \u06a9\u0627\u0631 \u0631\u0627 \u0647\u0645\u0631\u0627\u0647 \u0628\u0627 \u06a9\u062f\u0647\u0627\u06cc \u0622\u0645\u0627\u062f\u0647 \u0648 \u0628\u0647 \u0635\u0648\u0631\u062a \u062a\u0635\u0648\u06cc\u0631\u06cc \u06cc\u0627\u062f \u0645\u06cc\u200c\u06af\u06cc\u0631\u06cc\u062f.","breadcrumb":{"@id":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#breadcrumb"},"inLanguage":"fa-IR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/"]}]},{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#primaryimage","url":"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-game-on-nokia-phone.jpg","contentUrl":"https:\/\/quera.org\/blog\/wp-content\/uploads\/2023\/09\/snake-game-on-nokia-phone.jpg","width":1280,"height":720,"caption":"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646"},{"@type":"BreadcrumbList","@id":"https:\/\/quera.org\/blog\/snake-game-in-python-tutorial\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u062e\u0627\u0646\u0647","item":"https:\/\/quera.org\/blog\/"},{"@type":"ListItem","position":2,"name":"\u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u0647","item":"https:\/\/quera.org\/blog\/category\/developer\/"},{"@type":"ListItem","position":3,"name":"\u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc","item":"https:\/\/quera.org\/blog\/category\/developer\/technology\/"},{"@type":"ListItem","position":4,"name":"\u0628\u06a9\u200c\u0627\u0646\u062f","item":"https:\/\/quera.org\/blog\/category\/developer\/technology\/backend\/"},{"@type":"ListItem","position":5,"name":"\u0622\u0645\u0648\u0632\u0634 \u0633\u0627\u062e\u062a \u0628\u0627\u0632\u06cc \u0645\u0627\u0631 \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062f\u0631 \u06f8 \u0645\u0631\u062d\u0644\u0647 &#8211; \u062a\u0635\u0648\u06cc\u0631\u06cc \u0648 \u0622\u0633\u0627\u0646"}]},{"@type":"WebSite","@id":"https:\/\/quera.org\/blog\/#website","url":"https:\/\/quera.org\/blog\/","name":"\u06a9\u0648\u0626\u0631\u0627\u200c\u0628\u0644\u0627\u06af","description":"\u0647\u0645\u0647\u200c\u0686\u06cc\u0632 \u062f\u0631\u0628\u0627\u0631\u0647 \u062f\u0646\u06cc\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0646\u0648\u06cc\u0633\u06cc","publisher":{"@id":"https:\/\/quera.org\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/quera.org\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fa-IR"},{"@type":"Organization","@id":"https:\/\/quera.org\/blog\/#organization","name":"\u06a9\u0648\u0626\u0631\u0627","url":"https:\/\/quera.org\/blog\/","logo":{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/quera.org\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/quera.org\/blog\/wp-content\/uploads\/2022\/09\/logo-quera22-e1574766184574.png","contentUrl":"https:\/\/quera.org\/blog\/wp-content\/uploads\/2022\/09\/logo-quera22-e1574766184574.png","width":300,"height":300,"caption":"\u06a9\u0648\u0626\u0631\u0627"},"image":{"@id":"https:\/\/quera.org\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.instagram.com\/quera.ir\/"]},{"@type":"Person","@id":"https:\/\/quera.org\/blog\/#\/schema\/person\/0ee1df957de3ec63182bf55abc00a0c0","name":"\u0634\u0627\u06cc\u0627\u0646 \u0636\u06cc\u0627\u06cc\u06cc","image":{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/quera.org\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9156a1f93c9de0075e3001702ee1364102238404f7a27f194ec65dabca2a6a66?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9156a1f93c9de0075e3001702ee1364102238404f7a27f194ec65dabca2a6a66?s=96&d=mm&r=g","caption":"\u0634\u0627\u06cc\u0627\u0646 \u0636\u06cc\u0627\u06cc\u06cc"}}]}},"_links":{"self":[{"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/posts\/43624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/users\/49"}],"replies":[{"embeddable":true,"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/comments?post=43624"}],"version-history":[{"count":27,"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/posts\/43624\/revisions"}],"predecessor-version":[{"id":48444,"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/posts\/43624\/revisions\/48444"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/media\/43665"}],"wp:attachment":[{"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/media?parent=43624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/categories?post=43624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/quera.org\/blog\/wp-json\/wp\/v2\/tags?post=43624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}