Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/card.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2009-12-05 22:14:38 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2009-12-05 22:14:38 (GMT)
commit1acf794d8ef72d1424a3ff3f6b00b63c73abd2d8 (patch)
treee6afb257f898239559fc76b2f758924c0574f20e /card.py
parentc2daa3ea24f91bbf3daa5711d0b5971a587eb610 (diff)
cleaning up variable names
Diffstat (limited to 'card.py')
-rw-r--r--card.py32
1 files changed, 15 insertions, 17 deletions
diff --git a/card.py b/card.py
index a2888eb..cfbfba3 100644
--- a/card.py
+++ b/card.py
@@ -34,26 +34,24 @@ from sprites import *
# tw - image related
# pattern - game logic related
# card index is generated in the following loop:
-"""
- for shape in range(0,SHAPES):
- for color in range(0,COLORS):
- for num in range(0,NUMBER):
- for fill in range(0,FILLS):
-"""
+# for shape in range(0,SHAPES):
+# for color in range(0,COLORS):
+# for num in range(0,NUMBER):
+# for fill in range(0,FILLS):
# if shape == SELECTMASK then generate special card-selected overlay
#
class Card:
- def __init__(self,tw,shape,color,num,fill):
+ def __init__(self,vmw,shape,color,num,fill):
# what do we need to know about each card?
if shape == SELECTMASK:
- self.spr = sprNew(tw,0,0,self.load_image(tw.path+"selected",
- tw.card_w*tw.scale,
- tw.card_h*tw.scale))
+ self.spr = sprNew(vmw,0,0,self.load_image(vmw.path+"selected",
+ vmw.card_w*vmw.scale,
+ vmw.card_h*vmw.scale))
self.index = SELECTMASK
elif shape == MATCHMASK:
- self.spr = sprNew(tw,0,0,self.load_image(tw.path+"match",
- tw.card_w*tw.scale,
- tw.card_h*tw.scale))
+ self.spr = sprNew(vmw,0,0,self.load_image(vmw.path+"match",
+ vmw.card_w*vmw.scale,
+ vmw.card_h*vmw.scale))
self.index = MATCHMASK
else:
self.shape = shape
@@ -65,10 +63,10 @@ class Card:
self.num*FILLS+\
self.fill
# create sprite from svg file
- self.spr = sprNew(tw,0,0,self.load_image(tw.path+\
- str(self.index),
- tw.card_w*tw.scale,
- tw.card_h*tw.scale))
+ self.spr = sprNew(vmw,0,0,self.load_image(vmw.path+\
+ str(self.index),
+ vmw.card_w*vmw.scale,
+ vmw.card_h*vmw.scale))
self.spr.label = ""
def show_card(self):