Added some comments

master
David Raison 2014-08-31 03:44:49 +02:00
parent 9c24f74930
commit 9a6954ac8a
2 changed files with 15 additions and 0 deletions

10
game.py
View File

@ -188,6 +188,16 @@ class TheGame:
pinnedAvocados += [avo for avo in movingAvocados if avo.isPinned() ]
movingAvocados[:] = [ avo for avo in movingAvocados if avo.isFalling() ]
##############################
#
# Late-Night-Comments:
#
# Can we maybe handle the pinned avocados the same way I handle "stuck"
# pins? It seems to be easier.. well, the pins don't fall out of the screen
# though…
#
##############################
# Now redraw our avocados
for a in movingAvocados:
a.setTargetColor(color)

View File

@ -31,10 +31,15 @@ class Generate:
def moveTowardsTarget(self):
##############################
#
# Late-Night-Comments:
#
# OK, this works, but honestly,
# it would probably be much more effective
# to just be more lenient on isStuck
# e.g. accept approximate positions.
###############################
x, y = self.pos
tx, ty = self.target
xToCover = tx - x;