Anonymous avatar Anonymous committed 39e5e8d

bugfixes; visual indication of how many robots are left to build

Comments (0)

Files changed (3)

         
         self.screenSurface = theScreen
         pygame.sprite.Sprite.__init__(self)
-        image_surface = pygame.surface.Surface([10,size[1]*.8])
+        image_surface = pygame.surface.Surface([10,int(size[1]*.8)])
         image_surface.fill([255,255,255])
         self.image = image_surface.convert()
         self.rect = self.image.get_rect()

Source/YourStuff.py

         enviro.botFactoryIsBuilt = True
         enviro.screen.blit(self.botFactoryBuilt, self.rect)
         
+        coordX = enviro.getLocationX(0)
+        coordY = enviro.getLocationY(0)
+        for i in range(10):
+            pygame.draw.rect(enviro.screen, [255,0,0], 
+                [(coordX + 5) + (i+1) * 7,(coordY + 20),5,5],0)
+        
     def needMoney(self):
         #print "NEED MONEY"
         paintX = self.rect.left
                         enviro.harvesters.append(newHarv)
                         harvCount = len(enviro.harvesters)
                         #print "Now have", harvCount, "harvesters"
+                        
+                        coordX = enviro.getLocationX(0)
+                        coordY = enviro.getLocationY(0)
+                        pygame.draw.rect(enviro.screen, [255,255,255], 
+                            [(coordX + 5) + (harvCount) * 7,(coordY + 20),5,5],0)                        
+                        
+                        
                     #else:
                         #print "Max 10 harvesters!"
                         
     testing_modules = AAAmytest.testing_modules
 except ImportError:
     #print "prod mode!"
+    pass
 
 
 """ GLOBAL variables """
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.