Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def check_legal(self):
- div = int(math.sqrt(self.BoardSize))
- for x in range(0,div):
- for i in range(0,div):
- j=self.CurrentGameBoard[x][i]
- for k in range(0,div):
- if (j==self.CurrentGameBoard[x][k] and k!=i):
- return false
- for x in range(0,div):
- for i in range(0,div):
- j=self.CurrentGameBoard[i][x]
- for k in range(0,div):
- if (j==self.CurrentGameBoard[k][x] and k!=i):
- return false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement