You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
633 B
Python
25 lines
633 B
Python
class Settings:
|
|
"""A class to store all settings for Alien Invasion."""
|
|
|
|
def __init__(self):
|
|
"""Initialize the game's static settings."""
|
|
self.screen_width = 1200
|
|
self.screen_height = 800
|
|
self.bg_color = (230, 230, 230)
|
|
|
|
# Ship settings
|
|
self.ship_speed = 1.5
|
|
self.ship_limit = 3
|
|
|
|
# Bullet settings
|
|
self.bullet_speed = 3.0
|
|
self.bullet_width = 3
|
|
self.bullet_height = 15
|
|
self.bullet_color = (60, 60, 60)
|
|
self.bullets_allowed = 3
|
|
|
|
# Alien settings
|
|
self.alien_speed = 1.0
|
|
self.fleet_drop_speed = 10
|
|
self.fleet_direction = 1 # 1 represents right; -1 represents left
|