Skip to main content

Posts

Showing posts from February, 2021

MEET THE CODER.

Welcome To My Site,  I am Piyush Sharma and I am currently working on Python and  I will be currently posting my python projects from the beginning.😊😊

Snakes With Piyush ( Made using pygame module )

I have made this game using pygame module.  This is my first game in python. This game belongs to me. HOW TO PLAY GAME USING THIS CODE :-  1. Download any Python Running IDE and run this code. 2. If you want to run this code as Executable then you can use pyinstaller to convert this python file to executable. 3. You can simply click on  👉  Download   to get required files or you can use the exe. also (NOTE: you have to extract this folder) Here's the code the this game :- # -------------------Snakes Game------------------ # ==> PIYUSH SHARMA # importing required modules import pygame import random import os pygame.init() pygame.mixer.init() # Game colours neon = ( 0 , 255 , 0 ) black = ( 0 , 0 , 0 ) red = ( 255 , 0 , 0 ) white = ( 255 , 255 , 255 ) pinkish = ( 222 , 90 , 200 ) # Game related variables screen_length = 900 screen_width = 600 # Game window game_screen = pygame.disp...