Littluns

Littluns Commit Details

Date:2011-12-11 14:21:00 (1 year 5 months ago)
Author:Ciaran Gultnieks
Branch:master
Commit:988ce279c70cd2087d577985ff8262257ccd68f7
Parents: e15465d559331e5f3f8c4b21969d582969ce7544
Message:Fixed memory game sticking problem

Changes:
Mmemory.py (2 diffs)

File differences

memory.py
192192
193193
194194
195
195
196196
197197
198198
......
207207
208208
209209
210
210
211211
212212
213213
def handle_event(self, event):
if event.type == MOUSEBUTTONDOWN or (event.type == KEYUP and
event.key == K_SPACE):
if self.highlighteditem != None:
if self.highlighteditem != None and self.resulttime == 0:
if not self.highlighteditem.flipped and self.numflipped < 2:
self.highlighteditem.flip(True)
self.numflipped += 1
def control(self, elapsed):
if self.resulttime != 0:
self.resulttime -= elapsed
if self.resulttime < 0:
if self.resulttime <= 0:
self.resulttime = 0
if len(self.cards) == 0:
self.level += 1

Archive Download the corresponding diff file

Branches