Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
main_game
#python 3.5.2 print ("Hello, world!") ''' Snake game to use some python code ''' import pygame #Define colors BLACK = (0, 0, 0) WHITE = (255, 255, 255) GREEN = (0, 255, 0) RED = (255, 0, 0) pygame.init() size = (700, 400) screen = pygame.display.set_mode(size) pygame.display.set_caption("snake 2") CLOCK = pygame.time.Clock() #Loop until the final done = False while not done: for event in pygame.event.get(): if event.type == pygame.QUIT: done = True #Game logic here #Screen cleaning''' Snake game to use some python code ''' import pygame #Define colors BLACK = (0, 0, 0) WHITE = (255, 255, 255) GREEN = (0, 255, 0) RED = (255, 0, 0) pygame.init() size = (700, 400) screen = pygame.display.set_mode(size) pygame.display.set_caption("snake 2") CLOCK = pygame.time.Clock() #Loop until the final done = False while not done: for event in pygame.event.get(): if event.type == pygame.QUIT: done = True #Game logic here #Screen cleaning #Here screen to while #IF background image plece it here screen.fill(WHITE) #Drawing code here pygame.draw.line(screen, GREEN, [0, 0],[100, 100], 55) #Update the screen pygame.display.flip() #limit frames CLOCK.tick(60) #Close window pygame.quit() #Here screen to while #IF background image plece it here screen.fill(WHITE) #Drawing code here pygame.draw.line(screen, GREEN, [0, 0],[100, 100], 55) #Update the screen pygame.display.flip() #limit frames CLOCK.tick(60) #Close window pygame.quit()
run
|
edit
|
history
|
help
0
Урок 4 задача 4: решить в целых числах уравнение ax=b (python)
short hand if else
yield from example
gj
square cube
Regular falsi
handwash
(P2) Ciągi 2
Points
self