From 3bc2155085bf183977e10ce37eb5debc24e005b3 Mon Sep 17 00:00:00 2001 From: coolestdude1 Date: Wed, 24 Feb 2010 19:59:50 +0000 Subject: fixed rotation variables --- 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 -- cgit v0.9.1