Example #1
0
def middle_of(level):
    """
    Find out middle point of level

    :param level: level to inspect
    :type level: Level
    :returns: middle point of level
    :rtype: (int, int)
    """
    size = level_size(level)
    x_loc = size[1] // 2
    y_loc = size[3] // 2
    location = LevelLocation(level, (x_loc, y_loc))

    return location
Example #2
0
def middle_of(level):
    """
    Find out middle point of level

    :param level: level to inspect
    :type level: Level
    :returns: middle point of level
    :rtype: (int, int)
    """
    size = level_size(level)
    x_loc = size[1] // 2
    y_loc = size[3] // 2
    location = LevelLocation(level, (x_loc, y_loc))

    return location
Example #3
0
 def test_get_size(self):
     """
     Test that Level can report size
     """
     assert_that(level_size(self.level), is_(equal_to((0, 19, 0, 9))))
Example #4
0
 def test_get_size(self):
     """
     Test that Level can report size
     """
     assert_that(level_size(self.level), is_(equal_to((0, 19, 0, 9))))