def compute(self):
    self.calculateSpeed()
    self.moveTime += 1
    if ((self.moveTime % self.moveFrec) == 0):
        self.moveBlocksDown()
    doneChecking = 0
    y = 0
    while ((y < self.gridHeight) and (not doneChecking)):
        x = 0
        while ((x < self.gridWidth) and (not doneChecking)):
            if (self.grid[x][y] is None):
                doneChecking = 1
            x += 1
        y += 1
    if (not doneChecking):
        self.main.lose()
    self.timeTillNew -= 1
    if (self.timeTillNew == 0):
        self.getNewBlock()
        self.timeTillNew = self.maxTimeTillNew
    self.checkAdj()
def compute(self):
    self.calculateSpeed()
    self.moveTime += 1
    if ((self.moveTime % self.moveFrec) == 0):
        self.moveBlocksDown()
    doneChecking = 0
    y = 0
    while ((y < self.gridHeight) and (not doneChecking)):
        x = 0
        while ((x < self.gridWidth) and (not doneChecking)):
            if (self.grid[x][y] is None):
                doneChecking = 1
            x += 1
        y += 1
    if (not doneChecking):
        self.main.lose()
    self.timeTillNew -= 1
    if (self.timeTillNew == 0):
        self.getNewBlock()
        self.timeTillNew = self.maxTimeTillNew
    self.checkAdj()