Skip to content

Commit 6122201

Browse files
committed
started minicapstone
1 parent 22354b4 commit 6122201

File tree

5 files changed

+34
-0
lines changed

5 files changed

+34
-0
lines changed
8.27 KB
Loading
64.4 KB
Loading
2.35 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import pygame
2+
3+
pygame.init()
4+
#creats screen and size
5+
screen = pygame.display.set_mode((800, 600))
6+
7+
#Title and icon
8+
pygame.display.set_caption('New Game BOI')
9+
icon = pygame.image.load('strong.png')
10+
pygame.display.set_icon(icon)
11+
12+
#player
13+
player_img = pygame.image.load('karate(1).png')
14+
player_x = 100 #location of player on screen
15+
player_y = 500
16+
17+
def player():
18+
screen.blit(player_img, (player_x, player_y)) #blit means to draw
19+
20+
21+
running = True
22+
#infinte game loop to keep screen up
23+
while running:
24+
25+
#((R,G,B))0-255
26+
screen.fill((255, 0, 0))
27+
28+
for event in pygame.event.get():
29+
if event.type == pygame.QUIT:
30+
running = False
31+
32+
33+
player()
34+
pygame.display.update() #always have to use this when updating the screen

code/justin/mcapstone/strong.png

27.6 KB
Loading

0 commit comments

Comments
 (0)