Some general remarks:

>     def getEmptySlot(self):
>         i = 0
>         j = 0
>         while i  <= self.dim-1:
>             while j  <= self.dim-1:
>                 if self.elements[j][i] == -1:
>                     return [j, i]
>                 j = j+1
>             j = 0
>             i = i + 1

make this:

def getEmptySlot(self):
    for i in xrange(self.dim):
        for j in xrange(self.dim):
            if self.elements[i][j] == -1:
                return (i,j)

>     def getPossibleMoves(self):
>         emptySlot = self.getEmptySlot()
>         y = emptySlot[1]
>         x = emptySlot[0]

make this:

x,y = self.getEmptySlot()



-- 
Regards,

Diez B. Roggisch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to