Skip to content

Commit

Permalink
[Modify]
Browse files Browse the repository at this point in the history
  • Loading branch information
guanyilun committed May 12, 2012
1 parent 920113c commit 5e85f99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion antWorld.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def drawAnts(ant):
#Initialization
pygame.init()
fpsClock = pygame.time.Clock() #setup clock
antWorld = AntWorld(100, 800,800) # game model
antWorld = AntWorld(10, 800,800) # game model
FPS = 30 # frames per second setting
iWHITE = (250, 250, 250) # background color

Expand Down
6 changes: 3 additions & 3 deletions antWorldModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def run(self):
self.checkBoundary(ant)

def checkSuccess(self):
# for ant in self.ants:
# if self.getDistance(ant, self.food)<10:
# return True
for ant in self.ants:
if self.getDistance(ant, self.food)<10:
return True
return False

def getFoodPosition(self):
Expand Down
2 changes: 1 addition & 1 deletion life.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import random
from math import *
from math import pi, cos, sin

class Life:
def __init__(self, land):
Expand Down

0 comments on commit 5e85f99

Please sign in to comment.