Changeset 198


Ignore:
Timestamp:
05/23/12 13:57:42 (3 years ago)
Author:
andefodahl
Message:

works now x(

Location:
traintris
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • traintris/gameboard.py

    r194 r198  
    342342                    o = self.grid[i][j].isUsable()
    343343                    for z in range(len(self.foodType)):
    344    
    345    
    346                         if self.foodType[z][0] == k and o:
    347    
     344
     345                        if self.foodType[z][0] == k and o:   
    348346                            self.grid[i][j].changeStatus()
    349347                            self.grid[i][j].eatenRow = row
     
    357355                            self.grid[i][j].organism.food = self.foodType[z][1]
    358356                            foodsources += self.foodType[z][1]
    359 
    360357
    361358                        elif self.foodType[z][0] == k and self.stealFood( i, j ):
  • traintris/gameboardview.py

    r197 r198  
    525525                    if (event.type == KEYDOWN and event.key == K_ESCAPE):
    526526                        self.evManager.Post(QuitEvent())
    527                         end = False
     527                        end = false
     528                       
     529        if isinstance(event, QuitEvent):
     530            exitFunc()
    528531
    529532        if isinstance(event, Refresh):
  • traintris/graphics.py

    r197 r198  
    129129        self.drawText(string2, ((self.screenwidth / 2) -130, (self.screenheight / 2) + 20), 260, color, 40)
    130130   
    131     def drawMenuBox(self,
    132         boxsize = (self.screenwidth) / 5)
     131    def drawMenuBox(self):
     132        boxsize = ((self.screenwidth) / 5)
    133133        xstart = self.screenwidth - boxsize
    134134        ystart = self.screenheight - boxsize
    135135        self.drawImage("menubox", (xstart, ystart))
    136         #self.drawButton(r
    137136       
    138137    def drawBottomBar(self, daysRemaining, season, animal, diet, rang):
     
    143142        self.drawImage("bottomBar", (xstart, ystart))
    144143        self.drawImage(season, (xstart, ystart))
    145         self.drawImage(animal, (midbox, ystart)
     144        self.drawImage(animal, (midbox, ystart))
    146145        self.drawText(daysRemaining, (xstart + 100, ystart + 20), (mixbox - 110), self.black, 20)
    147146        self.drawText(diet, (midbox + 100, ystart + 20), 190, self.black, 20)
    148147        self.drawText(rang, (mixbox + 300, ystart + 20), 90, self.black, 20)
    149148   
    150     def drawCategoryBar(self):
     149    #def drawCategoryBar(self):
    151150       
    152151   
  • traintris/main.py

    r194 r198  
    3232    pygame.init()
    3333
    34     sound = pygame.mixer.Sound("rainforestambience.wav")
    35     sound.play(100, 0 , 1000)
     34    #sound = pygame.mixer.Sound("rainforestambience.wav")
     35    #sound.play(100, 0 , 1000)
    3636   
    3737    """..."""
Note: See TracChangeset for help on using the changeset viewer.