Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--blocku.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/blocku.py b/blocku.py
index b5fb014..79baaf1 100644
--- a/blocku.py
+++ b/blocku.py
@@ -164,6 +164,7 @@ class Game:
# load images to pipe to the sprite classes
blockImg = load_image('block.png')
Block.images = [blockImg]
+ gridImg = load_image('grid.png')
# the test will need rects and positions i sugest make some kind of default
# this information can be held by each block as they are created but is made here
@@ -173,6 +174,7 @@ class Game:
else:
background = background.convert()
+ background.blit(gridImg,(200,200))
screen.blit(background,(0,0))
pygame.display.flip()
@@ -187,6 +189,7 @@ class Game:
#main blocku code structs
blocks = pygame.sprite.Group()
Block.containers = blocks,spriteBatch
+ #blocks are Block(n,s,e,w,x,y) xy= starting position
aBlock = Block(1,2,3,4,200,200)
bBlock = Block(5,6,7,8,300,300)
@@ -266,6 +269,7 @@ class Game:
draw = spriteBatch.draw(screen)
pygame.display.update(draw)
+
# Try to stay at 30 FPS
self.clock.tick(30)