예제 #1
0
def get_num_ufo_x(game_settings, screen):
    ufo = Ufo(game_settings, screen)
    ufo_width = ufo.get_size()[0]
    availible_space_x = game_settings.get_screen_size()[0] - 2 * ufo_width
    return  int(availible_space_x /(2 * ufo_width))
예제 #2
0
def get_num_ufo_rows(game_settings, screen, ship):
    ufo = Ufo(game_settings, screen)
    ufo_height = ufo.get_size()[1]
    available_space_y = (game_settings.get_screen_size()[1] - (3 * ufo_height) - ship.get_size()[1])
    return int(available_space_y / (2 * ufo_height))