示例#1
0
 def test_mapLoaded_MayMove_Failure_OutOfBounds_Y(self):
     path = self._SimpleRealPath
     holder = MapHolder(self._ConfigProvider)
     holder.loadMap(path)
     PointFrom = Point(0, 900)
     PointTo = Point(1, 1)
     may = holder.mayMove(PointFrom, PointTo)
     self.assertFalse(may, "error")
示例#2
0
    def test_mapLoaded_MayMove_Success_LongPath(self):
        path = self._SimpleRealPath
        holder = MapHolder(self._ConfigProvider)
        holder.loadMap(path)
        PointFrom = Point(0, 0)
        PointTo = Point(1, 2)
        may = holder.mayMove(PointFrom, PointTo)

        self.assertTrue(may, "error")
示例#3
0
    def test_mapLoaded_MayMove_Fail_UnReachable(self):
        path = self._SimpleRealPath
        holder = MapHolder(self._ConfigProvider)
        holder.loadMap(path)
        PointFrom = Point(0, 0)
        PointTo = Point(3, 3)
        self._ConfigProvider.addValue('Game.MovementDefinations',
                                      'maximumAllowedPath', '1')
        may = holder.mayMove(PointFrom, PointTo)

        self.assertFalse(may, "error")