上传文件至 ''

This commit is contained in:
203310232 2021-06-20 16:18:35 +08:00
parent aaa819a193
commit d0b719f047
1 changed files with 11 additions and 0 deletions

11
waixinren.py Normal file
View File

@ -0,0 +1,11 @@
def get_number_aliens_x(ai_settings, alien_width):
available_space_x = ai_settings.screen_width - 2 * alien_width
number_aliens_x = int(available_space_x / (2 * alien_width))
return number_aliens_x
def get_number_rows(ai_settigs, ship_height, alien_height):
available_space_y = (ai_settigs.screen_height - (3 * alien_height) - ship_height)
number_rows = int (available_space_y / (3 * alien_height))
return number_rows