예제 #1
0
    def test_mapLoaded_GetPath_Failure_OutOfBounds_Y(self):
        path = self._SimpleRealPath
        holder = MapHolder(self._ConfigProvider)
        holder.loadMap(path)
        PointFrom = Point(0, 900)
        PointTo = Point(1, 1)
        path = holder.getPath(PointFrom, PointTo)

        self.assertFalse(path.valid, "error")
예제 #2
0
    def test_mapLoaded_GetPath_Success_LongPath_Draw(self):
        path = self._SimpleRealPath
        holder = MapHolder(self._ConfigProvider)
        holder.loadMap(path)
        PointFrom = Point(0, 0)
        PointTo = Point(1, 2)
        path = holder.getPath(PointFrom, PointTo)

        self.assertTrue(path.valid, "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')
        path = holder.getPath(PointFrom, PointTo)

        self.assertFalse(path.valid, "error")