diff options
author | Alan Aguiar <alanjas@hotmail.com> | 2014-01-21 03:08:28 (GMT) |
---|---|---|
committer | Alan Aguiar <alanjas@hotmail.com> | 2014-01-21 03:08:28 (GMT) |
commit | dab195ffccb18bdbf50070ce7d1cc56a1871981c (patch) | |
tree | 8c8b7240c5a8fac35f74fd1d21f35c8e1c3ec1c7 /src | |
parent | 0e990106a2811ad12eed9e109c93161ef86c1342 (diff) |
pychecker suggest changes
Diffstat (limited to 'src')
-rw-r--r-- | src/api/PartidasMan.py | 12 | ||||
-rw-r--r-- | src/api/Sprite2.py | 5 |
2 files changed, 5 insertions, 12 deletions
diff --git a/src/api/PartidasMan.py b/src/api/PartidasMan.py index 2404548..d356c56 100644 --- a/src/api/PartidasMan.py +++ b/src/api/PartidasMan.py @@ -5,15 +5,9 @@ class Partida(object): def __init__(self, aCharacter=None): self.mCharacter = aCharacter - area1 = [] - for i in range(6): - area1.append(0) - area2 = [] - for i in range(6): - area2.append(0) - area3 = [] - for i in range(6): - area3.append(0) + area1 = [0] * 6 + area2 = [0] * 6 + area3 = [0] * 6 self.mAreas = {1: area1, 2: area2, 3: area3} def isEmpty(self): diff --git a/src/api/Sprite2.py b/src/api/Sprite2.py index 16faf97..d22bef7 100644 --- a/src/api/Sprite2.py +++ b/src/api/Sprite2.py @@ -68,7 +68,7 @@ class CSprite(pygame.sprite.Sprite): if self.rect.collidepoint(CMouse().getPos()):
self.mactive = True
- if self.mactive == True:
+ if self.mactive:
if CMouse().release():
self.mactive = False
if self.rect.collidepoint(CMouse().getPos()):
@@ -129,8 +129,7 @@ class CSprite(pygame.sprite.Sprite): print major properties
extend to add your own properties
"""
- print "x: %d, y: %d, speed: %.2f, dx: %.2f, dy: %.2f" % \
- (self.mPos.x, self.mPos.y, self.mSpeed, self.mAngle, self.dx, self.dy)
+ print "x: %d, y: %d, speed: %.2f" % (self.mPos.x, self.mPos.y, self.mSpeed)
def mouseDown(self):
""" boolean function. Returns True if the mouse is
|