All pastes #741688 Raw Edit

Something

public python v1 · immutable
·published 2007-10-18 22:01 UTC
rendered paste body
def findmaxlocal(self,ghosts,diff):        # meilleure position locale dans la grille        x = 0        y = 0        max = 0        pos = []        for yi in range(self.grille.hauteur):            for xi in range(self.grille.largeur):                if ghosts[yi][xi] > max and diff[yi][xi] > 0:                    pos = [(xi,yi)]                    max = ghosts[yi][xi]        if max == 0:            "c'est la cata"            return False        else:            return pos