Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcoolestdude1 <arielzamparini@gmail.com>2010-02-24 19:59:50 (GMT)
committer coolestdude1 <arielzamparini@gmail.com>2010-02-24 19:59:50 (GMT)
commit3bc2155085bf183977e10ce37eb5debc24e005b3 (patch)
tree9b72df90b5bc8519aeaaf9462d182ac0d4fcaaa5
parenteb22c65f8f0c66b3e335cb2571c6a1863fb3c218 (diff)
fixed rotation variables
-rw-r--r--blocku.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/blocku.py b/blocku.py
index ad7007f..2152057 100644
--- a/blocku.py
+++ b/blocku.py
@@ -74,10 +74,10 @@ class Block(pygame.sprite.Sprite):
#keep the block on the screen
self.rect = self.rect.clamp(SCREENRECT)
self.image = self.images[0].copy()
- self.image.blit(self.font.render('1', 0, self.color),(30,0))
- self.image.blit(self.font.render('2', 0, self.color),(50,25))
- self.image.blit(self.font.render('3', 0, self.color),(25,50))
- self.image.blit(self.font.render('4', 0, self.color),(5,25))
+ self.image.blit(self.font.render(str(self.north), 0, self.color),(26,3))
+ self.image.blit(self.font.render(str(self.east), 0, self.color),(47,25))
+ self.image.blit(self.font.render(str(self.south), 0, self.color),(26,47))
+ self.image.blit(self.font.render(str(self.west), 0, self.color),(5,25))
# game logic here for snapping to grid ...?
# when the block is snapped to the grid clamp the rect there
def move(self, direction):
@@ -105,7 +105,7 @@ class Block(pygame.sprite.Sprite):
self.east = self.south
self.south = self.west
self.west = temp
- print self.north, self.east, self.south, self.west
+ #print self.north, self.east, self.south, self.west
class Puzzle:
def __init__(self):
@@ -201,6 +201,7 @@ class Game:
keyDown = False
# it is important to note that like xna the origin is 0,0
# the top left of the current window
+ # print is trace in console
# and increases as you go down and to the right
# pygame has a collision detector under pygame.sprite.spritecollide(group,group,dokill)
# this will return a list of colliders, dokill will remove the colliders from the parrent group if true