From f285eb935d219f361d8d6b9189b7e3849c0d9e99 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Tue, 25 Jan 2022 11:51:11 +0800 Subject: [PATCH] save project --- snake.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/snake.py b/snake.py index d4f3df2..b4e1643 100644 --- a/snake.py +++ b/snake.py @@ -2,7 +2,14 @@ import pygame from pygame import locals pygame.init() screen=pygame.display.set_mode((800,600)) +strawberry=pygame.image.load('bg.png') +apple=pygame.image.load('apple.png') +right=pygame.image.load('right.png') while True: for event in pygame.event.get(): - if event. ==locals.QUIT: - exit() \ No newline at end of file + if event.type ==locals.QUIT: + exit() + screen.blit(strawberry,(0,0)) + screen.blit(apple,(420,150)) + screen.blit(right,(240,120)) + pygame.display.update() \ No newline at end of file -- libgit2 0.25.0