-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimulationEntity.py
51 lines (32 loc) · 1.11 KB
/
SimulationEntity.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
39
40
41
42
43
44
45
46
47
48
49
50
51
class SimulationEntity:
def __init__(self, simulation_map):
self.map = simulation_map
self.counter = 0
class Creature(SimulationEntity):
def __init__(self, simulation_map):
super().__init__(simulation_map)
class Herbivore(Creature):
"""Класс травоядных существ"""
def __init__(self, simulation_map):
super().__init__(simulation_map)
self.marking = 'H'
class Predator(Creature):
"""Класс хищников"""
def __init__(self, simulation_map):
super().__init__(simulation_map)
self.marking = 'P'
class Tree(SimulationEntity):
"""Класс дерева"""
def __init__(self, simulation_map):
super().__init__(simulation_map)
self.marking = 'T'
class Rock(SimulationEntity):
"""Класс камня"""
def __init__(self, simulation_map):
super().__init__(simulation_map)
self.marking = 'R'
class Grass(SimulationEntity):
"""Класс травы"""
def __init__(self, simulation_map):
super().__init__(simulation_map)
self.marking = 'G'