def testGridUserAdjacentToEndStateFailValidation(): grid = numpy.zeros((3, 3), str) grid[1][1] = 'U' grid[0][1] = 'T' assert (gridbuild.validateGrid(grid)) == False grid[0][1] = 'P' assert (gridbuild.validateGrid(grid)) == False
def testGridUserStoneTrappedFailValidation(): grid = numpy.zeros((3, 3), str) grid[0][0] = 'U' grid[0][1] = 'S' grid[1][0] = 'S' grid[1][1] = 'T' assert (gridbuild.validateGrid(grid)) == False
def testGridSuccessValidation(): grid = numpy.zeros((3, 3), str) grid[0][0] = 'U' grid[0][1] = 'S' grid[1][1] = 'S' grid[2][2] = 'T' assert (gridbuild.validateGrid(grid)) == True
def testGridTreasurePitTrappedFailValidation(): grid = numpy.zeros((3, 3), str) grid[0][0] = 'T' grid[0][1] = 'P' grid[1][0] = 'P' grid[1][1] = 'U' assert (gridbuild.validateGrid(grid)) == False
def testGridUserTrappedWithoutStreamFailValidation(): grid = numpy.zeros((3, 3), str) grid[0][0] = 'U' grid[0][2] = 'S' grid[1][0] = 'S' grid[1][1] = 'S' grid[2][2] = 'T' assert (gridbuild.validateGrid(grid)) == False
def testGridUserTrappedWithStreamSuccessValidation(): grid = numpy.zeros((3, 3), str) grid[0][0] = 'U' grid[0][2] = 'S' grid[1][0] = 'S' grid[1][1] = 'S' grid[2][2] = 'T' grid[0][1] = '1' grid[2][1] = '1' assert (gridbuild.validateGrid(grid)) == True