|
@@ -1,18 +1,12 @@
|
1
|
1
|
import pygame
|
2
|
|
-from intelligine.synergy.Colony import Colony
|
3
|
|
-from intelligine.synergy.Environment import Environment
|
4
|
|
-from intelligine.synergy.object.StockedFood import StockedFood
|
5
|
|
-from synergine.synergy.Simulation import Simulation
|
|
2
|
+from intelligine.display.map import get_map_connector
|
6
|
3
|
from synergine_xyz.display.PygameImageRotate import PygameImageRotate
|
7
|
4
|
from synergine_xyz.display.PygameVisualisation import PygameVisualisation
|
8
|
5
|
from synergine_xyz.display.object.pygame.PygameImage import PygameImage
|
9
|
|
-from intelligine.synergy.object.Food import Food
|
10
|
6
|
from intelligine.synergy.object.ant.Ant import Ant
|
11
|
|
-from intelligine.synergy.object.Rock import Rock
|
12
|
7
|
from intelligine.synergy.object.ant.Egg import Egg
|
13
|
8
|
from os import getcwd
|
14
|
9
|
from synergine_xyz.cst import PREVIOUS_DIRECTION
|
15
|
|
-from synergine_xyz.tmx.TileMapConnector import TileMapConnector
|
16
|
10
|
|
17
|
11
|
SURFACE_PHEROMONE_HOME = 'molecule_home'
|
18
|
12
|
SURFACE_PHEROMONE_EXPLORATION = 'molecule_exploration'
|
|
@@ -158,22 +152,6 @@ def for_position(position, objects, context):
|
158
|
152
|
# Behind, new
|
159
|
153
|
#############################
|
160
|
154
|
|
161
|
|
-map_config = {
|
162
|
|
- 'simulation': {
|
163
|
|
- 'base': Simulation
|
164
|
|
- },
|
165
|
|
- 'collection': {
|
166
|
|
- 'ant': Colony,
|
167
|
|
- 'env': Environment
|
168
|
|
- },
|
169
|
|
- 'object': {
|
170
|
|
- 'ant': Ant,
|
171
|
|
- 'egg': Egg,
|
172
|
|
- 'rock': Rock,
|
173
|
|
- 'food': Food,
|
174
|
|
- 'stocked_food': StockedFood
|
175
|
|
- }
|
176
|
|
-}
|
177
|
155
|
image_rotate = PygameImageRotate()
|
178
|
156
|
|
179
|
157
|
|
|
@@ -203,7 +181,7 @@ def ant_direction_modifier(obj, context, visual):
|
203
|
181
|
|
204
|
182
|
|
205
|
183
|
def get_standard_extract_from_map(map_file_path, map_config):
|
206
|
|
- map_connector = TileMapConnector.from_file(map_file_path, dict(map_config))
|
|
184
|
+ map_connector = get_map_connector(map_file_path, map_config)
|
207
|
185
|
visualisation = PygameVisualisation.get_default_visualisation()
|
208
|
186
|
|
209
|
187
|
simulations = map_connector.create_simulations()
|