def charge_all(self,values): for r in range(0,self.rows): for c in range(0,self.cols): #self.matrix[r][c].draw() spot = self.matrix[r][c] if values[c][r] > threshold: spot.setValue(spot.value + values[c][r]/255.0*charge_factor)
def charge(self,row,col,cvalue): spot = self.matrix[row][col] spot.setValue(spot.value + cvalue)