From 9a6954ac8a1047e26c27e32bec3d3bff516ed5f4 Mon Sep 17 00:00:00 2001 From: David Raison Date: Sun, 31 Aug 2014 03:44:49 +0200 Subject: [PATCH] Added some comments --- game.py | 10 ++++++++++ pingenerator.py | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/game.py b/game.py index 5380111..9ca2342 100755 --- a/game.py +++ b/game.py @@ -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) diff --git a/pingenerator.py b/pingenerator.py index 1315add..610365d 100644 --- a/pingenerator.py +++ b/pingenerator.py @@ -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;