-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyspaceinvaders_conf.py
38 lines (33 loc) · 1.24 KB
/
pyspaceinvaders_conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# $LastChangedDate: 2009-08-23 18:40:21 -0500 (Sun, 23 Aug 2009) $
# Configuration.
# Author: Jim Brooks http://www.jimbrooks.org
# Date: initial 2004/08, rewritten 2009/08
# License: GNU General Public License Version 2 (GPL2).
#===============================================================================
"""Configuration options"""
class Conf():
"""Space Invaders speficic and pygame configurations"""
# pyspaceinvaders-specific:
CEILING = 32
GROUND_PADDING = 6
PLAYER_LIVES = 5
# pygame:
WINDOW_WIDTH = 550
WINDOW_HEIGHT = 500
WINDOW_TITLE = "Python Space Invaders"
WINDOW_ICON = "img/alien1.png"
FONT_NAME = None # pygame default
FONT_SIZE = 28
TIMER_TICK = 40
#-------------------------------------------------------------------------------
# Color definitions.
#-------------------------------------------------------------------------------
class Color(object):
"""Color definitions"""
BG = (0x00, 0x00, 0x00, 0xff)
TEXT = (0xd2, 0xf0, 0xff, 0xff)
ALIVE = (0x00, 0xff, 0x00, 0xff)
DEAD = (0xff, 0x00, 0x00, 0xff)
GAME_OVER = DEAD
GREEN = (0x00, 0xff, 0x00, 0xff)
CYAN = (0x00, 0xc8, 0xc8, 0xff)