picnic: use ttr's checker boards

This commit is contained in:
Wilee999 1980-01-01 18:56:35 -08:00
parent a7e57a8694
commit 9ed7402631
2 changed files with 1143 additions and 1143 deletions

View file

@ -4,7 +4,7 @@ class CheckersBoard:
def __init__(self): def __init__(self):
self.squareList = [] self.squareList = []
for x in xrange(32): for x in range(32):
self.squareList.append(CheckersTile(x)) self.squareList.append(CheckersTile(x))
self.squareList[0].setAdjacent([None, self.squareList[0].setAdjacent([None,
@ -285,14 +285,14 @@ class CheckersBoard:
def getStates(self): def getStates(self):
retList = [] retList = []
for x in xrange(32): for x in range(32):
retList.append(self.squareList[x].getState()) retList.append(self.squareList[x].getState())
return retList return retList
def setStates(self, squares): def setStates(self, squares):
y = 0 y = 0
for x in xrange(32): for x in range(32):
self.squareList[x].setState(squares[x]) self.squareList[x].setState(squares[x])
def getJumps(self, squareNum): def getJumps(self, squareNum):

View file

@ -4,7 +4,7 @@ class ChineseCheckersBoard:
def __init__(self): def __init__(self):
self.squareList = [] self.squareList = []
for x in xrange(121): for x in range(121):
self.squareList.append(CheckersSquare(x)) self.squareList.append(CheckersSquare(x))
self.squareList[0].setAdjacent([None, self.squareList[0].setAdjacent([None,
@ -767,14 +767,14 @@ class ChineseCheckersBoard:
def getStates(self): def getStates(self):
retList = [] retList = []
for x in xrange(121): for x in range(121):
retList.append(self.squareList[x].getState()) retList.append(self.squareList[x].getState())
return retList return retList
def setStates(self, squares): def setStates(self, squares):
y = 0 y = 0
for x in xrange(121): for x in range(121):
self.squareList[x].setState(squares[x]) self.squareList[x].setState(squares[x])