예제 #1
0
 def testRemoveExit(self):
     cell = Cell()
     cell.addExit(1, 0)
     
     cell.removeExit(1, 0)
     
     self.assertFalse(cell.hasExit(1, 0))
예제 #2
0
 def testFromArrows(self):
     cell = Cell('^>')
     
     self.assertTrue(cell.hasExit(1, 0))
     self.assertFalse(cell.hasExit(-1, 0))
예제 #3
0
 def testAddExit(self):
     cell = Cell()
     cell.addExit(1, 0)
     
     self.assertTrue(cell.hasExit(1, 0))
     self.assertFalse(cell.hasExit(-1, 0))
예제 #4
0
 def testHasExit(self):
     cell = Cell((1, 0))
     
     self.assertTrue(cell.hasExit(1, 0))
     self.assertFalse(cell.hasExit(-1, 0))