diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2010-01-09 20:07:58 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2010-01-09 20:07:58 (GMT) |
commit | 49141e8b29a9bb4fefb46745961c6d848b07704f (patch) | |
tree | 5b2643776b7ce2715337a9b86b6092b1e5de1d04 /grid.py | |
parent | d287399b5fc873c0bd545eb5ed37cd9158a76350 (diff) |
general cleanup
Diffstat (limited to 'grid.py')
-rw-r--r-- | grid.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -85,7 +85,9 @@ class Grid: # Remove a match from the grid and replace it with new cards from the deck. def remove_and_replace(self, clicked_set, deck): for a in clicked_set: - # Find the index into the grid of the clicked card + # Move the match to the match display area + self.display_match(a, clicked_set.index(a)) + # Find the index into the grid of the match card i = self.spr_to_grid(a) # Don't add new cards if bottom row is occupied if self.cards_in_grid() == DEAL: @@ -100,9 +102,8 @@ class Grid: else: # Mark as empty the grid positions we are not refilling self.grid[i] = None - self.display_match(a, clicked_set.index(a)) - # Move clicked card to the match area + # Move card to the match area. def display_match(self, spr, i): spr.move((MATCH_POSITION, self.top + i*self.yinc)) spr.set_layer(2000) |