################################################################################ if __name__ == "__main__": print("Unit test for BoardNode.py mechanics: Should return no falses") class Test: pass class TestBoard: pass N = Directions.NORTH E = Directions.EAST S = Directions.SOUTH W = Directions.WEST bNode = Test() brd = TestBoard() brd._goalLocation = (3, 4) die = Die() loc = (3, 4) die.rotate(N) die.rotate(E) bNode.die = die bNode.location = (2, 5) bNode.board = brd print(ManhattanDistanceAccountingOrientation(bNode) == 2) bNode.die.rotate(S) bNode.location = (3, 5) print("This concludes tests for BoardNode.py")
################################################################################ if __name__ == "__main__": print ("Unit test for BoardNode.py mechanics: Should return no falses") class Test: pass class TestBoard: pass N=Directions.NORTH E=Directions.EAST S=Directions.SOUTH W=Directions.WEST bNode = Test() brd = TestBoard() brd._goalLocation = (3,4) die = Die() loc = (3,4) die.rotate(N) die.rotate(E) bNode.die = die bNode.location = (2,5) bNode.board = brd print (ManhattanDistanceAccountingOrientation(bNode)==2) bNode.die.rotate(S) bNode.location = (3,5) print ("This concludes tests for BoardNode.py")