Bastien Sevajol 5 years ago
parent
commit
4ba76e7069

+ 2 - 2
intelligine/core/Context.py View File

@@ -1,6 +1,6 @@
1
-from xyzworld.Context import Context as XyzContext
1
+from synergine_xyz.Context import Context as XyzContext
2 2
 from intelligine.cst import IMPENETRABLE
3
-from xyzworld.cst import POSITIONS
3
+from synergine_xyz.cst import POSITIONS
4 4
 from intelligine.synergy.stigmergy.PheromonesManager import PheromonesManager
5 5
 
6 6
 

+ 1 - 1
intelligine/display/Pygame.py View File

@@ -1,5 +1,5 @@
1 1
 from intelligine.core.exceptions import NoPheromone
2
-from xyzworld.display.Pygame import Pygame as XyzPygame
2
+from synergine_xyz.display.Pygame import Pygame as XyzPygame
3 3
 import pygame
4 4
 from intelligine.cst import PHEROMON_DIRECTION, PHEROMON_DIR_HOME, PHEROMON_DIR_EXPLO, PHEROMON_POSITIONS
5 5
 from intelligine.display.pygame.visualisation import SURFACE_PHEROMONE_EXPLORATION, SURFACE_PHEROMONE_HOME

+ 3 - 3
intelligine/display/pygame/visualisation.py View File

@@ -1,5 +1,5 @@
1
-from xyworld.display.object.pygame.PygameImage import PygameImage
2
-from xyworld.display.object.pygame.DirectionnedImage import DirectionnedImage
1
+from synergine_xyz.display.object.pygame.PygameImage import PygameImage
2
+from synergine_xyz.display.object.pygame.DirectionnedImage import DirectionnedImage
3 3
 from intelligine.synergy.object.Bug import Bug
4 4
 from intelligine.synergy.object.Food import Food
5 5
 from intelligine.synergy.object.Hole import Hole
@@ -10,7 +10,7 @@ from intelligine.sandbox.colored.GreenAnt import GreenAnt
10 10
 from intelligine.synergy.object.Rock import Rock
11 11
 from intelligine.synergy.object.ant.Egg import Egg
12 12
 from os import getcwd
13
-from xyzworld.cst import PREVIOUS_DIRECTION
13
+from synergine_xyz.cst import PREVIOUS_DIRECTION
14 14
 
15 15
 SURFACE_PHEROMONE_HOME = 'pheromone_home'
16 16
 SURFACE_PHEROMONE_EXPLORATION = 'pheromone_exploration'

+ 1 - 1
intelligine/simulation/object/brain/part/move/AntMoveBrainPart.py View File

@@ -1,5 +1,5 @@
1 1
 from intelligine.simulation.object.brain.part.move.MoveBrainPart import MoveBrainPart
2
-from xyzworld.cst import POSITION
2
+from synergine_xyz.cst import POSITION
3 3
 from intelligine.core.exceptions import NoPheromone
4 4
 from intelligine.cst import PHEROMONE_SEARCHING, MOVE_MODE_EXPLO, COL_TRANSPORTER_NOT_CARRYING, COL_TRANSPORTER_CARRYING
5 5
 from intelligine.simulation.pheromone.DirectionPheromone import DirectionPheromone

+ 1 - 1
intelligine/simulation/object/brain/part/move/MoveBrainPart.py View File

@@ -2,7 +2,7 @@ from intelligine.core.exceptions import DirectionException
2 2
 from intelligine.simulation.object.brain.part.BrainPart import BrainPart
3 3
 from intelligine.synergy.event.move.direction import directions_same_level, directions_slighty
4 4
 from random import randint, choice, randrange
5
-from xyzworld.cst import BLOCKED_SINCE, PREVIOUS_DIRECTION
5
+from synergine_xyz.cst import BLOCKED_SINCE, PREVIOUS_DIRECTION
6 6
 
7 7
 
8 8
 class MoveBrainPart(BrainPart):

+ 1 - 1
intelligine/simulation/object/brain/part/transport/AntPutBrainPart.py View File

@@ -2,7 +2,7 @@ from intelligine.core.exceptions import CantFindWhereToPut
2 2
 from intelligine.cst import MOVE_MODE_EXPLO, TYPE_RESOURCE_TRANSFORMABLE, CARRIED
3 3
 from intelligine.simulation.object.brain.part.transport.TransportBrainPart import TransportBrainPart
4 4
 from intelligine.synergy.object.Food import Food
5
-from xyzworld.cst import POSITION, POSITIONS
5
+from synergine_xyz.cst import POSITION, POSITIONS
6 6
 
7 7
 
8 8
 class AntPutBrainPart(TransportBrainPart):

+ 1 - 1
intelligine/simulation/pheromone/DirectionPheromone.py View File

@@ -1,7 +1,7 @@
1 1
 from intelligine.cst import PHEROMON_DIRECTION, PHEROMON_POSITIONS
2 2
 from intelligine.core.exceptions import NoPheromone
3 3
 from random import shuffle
4
-from xyzworld.geometry import get_degree_from_north
4
+from synergine_xyz.geometry import get_degree_from_north
5 5
 from intelligine.synergy.event.move.direction import get_direction_for_degrees
6 6
 
7 7
 

+ 1 - 1
intelligine/synergy/ColonyConfiguration.py View File

@@ -1,7 +1,7 @@
1 1
 from synergine.synergy.collection.Configuration import Configuration
2 2
 from intelligine.synergy.object.ant.Ant import Ant
3 3
 from intelligine.cst import ALIVE, COLONY
4
-from xyzworld.cst import POSITION
4
+from synergine_xyz.cst import POSITION
5 5
 
6 6
 
7 7
 class ColonyConfiguration(Configuration):

+ 1 - 1
intelligine/synergy/Simulation.py View File

@@ -1,5 +1,5 @@
1 1
 from synergine.synergy.Simulation import Simulation as BaseSimulation
2
-from xyzworld.cst import POSITION, POSITIONS
2
+from synergine_xyz.cst import POSITION, POSITIONS
3 3
 #from intelligine.synergy.event.attack.NearAttackableAction import NearAttackableAction
4 4
 from intelligine.synergy.event.transport.PutableAction import PutableAction
5 5
 from intelligine.synergy.event.transport.TakeableAction import TakeableAction

+ 1 - 1
intelligine/synergy/event/attack/NearAttackableEvent.py View File

@@ -1,7 +1,7 @@
1 1
 from intelligine.core.exceptions import NearNothingFound
2 2
 from synergine.core.exceptions import NotConcernedEvent
3 3
 from intelligine.synergy.event.src.NearEvent import NearEvent
4
-from xyzworld.mechanism.AroundMechanism import AroundMechanism
4
+from synergine_xyz.mechanism.AroundMechanism import AroundMechanism
5 5
 from intelligine.cst import ATTACKABLE, COLONY, COL_FIGHTER, BRAIN_PART_ATTACK
6 6
 
7 7
 

+ 1 - 1
intelligine/synergy/event/move/MoveAction.py View File

@@ -2,7 +2,7 @@ from synergine.synergy.event.Action import Action
2 2
 from intelligine.synergy.event.move.MoveEvent import MoveEvent
3 3
 from synergine.synergy.event.exception.ActionAborted import ActionAborted
4 4
 from intelligine.cst import BRAIN_PART_MOVE
5
-from xyzworld.cst import BLOCKED_SINCE
5
+from synergine_xyz.cst import BLOCKED_SINCE
6 6
 
7 7
 
8 8
 class MoveAction(Action):

+ 1 - 1
intelligine/synergy/event/move/MoveEvent.py View File

@@ -4,7 +4,7 @@ from synergine.core.exceptions import NotConcernedEvent
4 4
 from intelligine.synergy.event.Event import Event
5 5
 from synergine.core.simulation.mechanism.Mechanism import Mechanism
6 6
 from intelligine.cst import COL_WALKER, BRAIN_SCHEMA, BRAIN_PART_MOVE
7
-from xyzworld.cst import POSITION
7
+from synergine_xyz.cst import POSITION
8 8
 
9 9
 
10 10
 class MoveEvent(Event):

+ 1 - 1
intelligine/synergy/event/src/NearEvent.py View File

@@ -1,6 +1,6 @@
1 1
 from intelligine.core.exceptions import NearNothingFound
2 2
 from intelligine.synergy.event.Event import Event
3
-from xyzworld.mechanism.AroundMechanism import AroundMechanism
3
+from synergine_xyz.mechanism.AroundMechanism import AroundMechanism
4 4
 
5 5
 
6 6
 class NearEvent(Event):

+ 1 - 1
intelligine/synergy/event/transport/PutableEvent.py View File

@@ -2,7 +2,7 @@ from intelligine.core.exceptions import NearNothingFound, CantFindWhereToPut
2 2
 from intelligine.synergy.event.src.NearEvent import NearEvent
3 3
 from synergine.core.exceptions import NotConcernedEvent
4 4
 from intelligine.cst import CANT_PUT_STILL, COL_TRANSPORTER_CARRYING, TRANSPORTABLE, BRAIN_SCHEMA, BRAIN_PART_PUT
5
-from xyzworld.mechanism.AroundMechanism import AroundMechanism
5
+from synergine_xyz.mechanism.AroundMechanism import AroundMechanism
6 6
 
7 7
 
8 8
 class PutableEvent(NearEvent):

+ 1 - 1
intelligine/synergy/event/transport/TakeableEvent.py View File

@@ -1,7 +1,7 @@
1 1
 from intelligine.core.exceptions import NearNothingFound
2 2
 from synergine.core.exceptions import NotConcernedEvent
3 3
 from intelligine.synergy.event.src.NearEvent import NearEvent
4
-from xyzworld.mechanism.AroundMechanism import AroundMechanism
4
+from synergine_xyz.mechanism.AroundMechanism import AroundMechanism
5 5
 from intelligine.cst import TRANSPORTABLE, CANT_CARRY_STILL, COL_TRANSPORTER_NOT_CARRYING, BRAIN_SCHEMA, BRAIN_PART_TAKE
6 6
 
7 7
 

+ 1 - 1
intelligine/synergy/object/Hole.py View File

@@ -1,4 +1,4 @@
1
-from xyzworld.SynergyObject import SynergyObject as XyzSynergyObject
1
+from synergine_xyz.SynergyObject import SynergyObject as XyzSynergyObject
2 2
 
3 3
 
4 4
 class Hole(XyzSynergyObject):

+ 1 - 1
intelligine/synergy/object/Rock.py View File

@@ -1,4 +1,4 @@
1
-from xyzworld.SynergyObject import SynergyObject as XyzSynergyObject
1
+from synergine_xyz.SynergyObject import SynergyObject as XyzSynergyObject
2 2
 from intelligine.cst import IMPENETRABLE
3 3
 
4 4
 

+ 1 - 1
intelligine/synergy/object/Transportable.py View File

@@ -1,4 +1,4 @@
1
-from xyzworld.SynergyObject import SynergyObject as XyzSynergyObject
1
+from synergine_xyz.SynergyObject import SynergyObject as XyzSynergyObject
2 2
 from intelligine.cst import TRANSPORTABLE
3 3
 
4 4
 

+ 0 - 1
modules/lifegame View File

@@ -1 +0,0 @@
1
-../../synergine/modules/lifegame

+ 0 - 1
modules/stigengine View File

@@ -1 +0,0 @@
1
-../../stigengine/stigengine

+ 0 - 1
modules/synergine View File

@@ -1 +0,0 @@
1
-../../synergine/synergine

+ 0 - 1
modules/xyworld View File

@@ -1 +0,0 @@
1
-../../synergine/modules/xyworld

+ 0 - 1
modules/xyzworld View File

@@ -1 +0,0 @@
1
-../../synergine/modules/xyzworld

+ 2 - 0
requirements.txt View File

@@ -0,0 +1,2 @@
1
+synergine>=0.0.1
2
+synergine_xyz>=0.0.1

+ 1 - 5
run.py View File

@@ -1,9 +1,5 @@
1
-from os import getcwd
2
-from sys import path as ppath
3
-ppath.insert(1,getcwd()+'/modules') # TODO: win32 compatibilite (python path)
4
-
5 1
 from synergine.core.Core import Core
6 2
 from config import config
7 3
 
8 4
 if __name__ == '__main__':
9
-    Core.start_core(config, modules_path='modules')
5
+    Core.start_core(config)

+ 2 - 2
tests_requirements.txt View File

@@ -1,2 +1,2 @@
1
-python-coveralls==2.4.2
2
-coverage==3.7.1
1
+synergine>=0.0.1
2
+synergine_xyz>=0.0.1