forked from gwillem/rgkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
34 lines (29 loc) · 893 Bytes
/
Copy pathsettings.py
File metadata and controls
34 lines (29 loc) · 893 Bytes
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
settings = {
# game settings
'spawn_every': 10,
'spawn_per_player': 5,
'board_size': 19,
'robot_hp': 50,
'attack_range': (8, 10),
'collision_damage': 5,
'suicide_damage': 15,
'max_turns': 100,
# rendering
'turn_interval': 100,
# rating systems
'rating_range': 150,
'default_rating': 1200,
# user-scripting
'max_usercode_time': 300,
'exposed_properties': ('location', 'hp', 'player_id'),
'player_only_properties': ('robot_id',),
'valid_commands': ('move', 'attack', 'guard', 'suicide'),
'user_obj_types': ('Commander', 'Robot', 'TankRobot'),
'user_modules': ('numpy', 'euclid', 'random'),
}
# just change stuff above this line
class AttrDict(dict):
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
settings = AttrDict(settings)