Bastien Sevajol 10 年前
父节点
当前提交
4ba76e7069

+ 2 - 2
intelligine/core/Context.py 查看文件

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

+ 1 - 1
intelligine/display/Pygame.py 查看文件

1
 from intelligine.core.exceptions import NoPheromone
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
 import pygame
3
 import pygame
4
 from intelligine.cst import PHEROMON_DIRECTION, PHEROMON_DIR_HOME, PHEROMON_DIR_EXPLO, PHEROMON_POSITIONS
4
 from intelligine.cst import PHEROMON_DIRECTION, PHEROMON_DIR_HOME, PHEROMON_DIR_EXPLO, PHEROMON_POSITIONS
5
 from intelligine.display.pygame.visualisation import SURFACE_PHEROMONE_EXPLORATION, SURFACE_PHEROMONE_HOME
5
 from intelligine.display.pygame.visualisation import SURFACE_PHEROMONE_EXPLORATION, SURFACE_PHEROMONE_HOME

+ 3 - 3
intelligine/display/pygame/visualisation.py 查看文件

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
 from intelligine.synergy.object.Bug import Bug
3
 from intelligine.synergy.object.Bug import Bug
4
 from intelligine.synergy.object.Food import Food
4
 from intelligine.synergy.object.Food import Food
5
 from intelligine.synergy.object.Hole import Hole
5
 from intelligine.synergy.object.Hole import Hole
10
 from intelligine.synergy.object.Rock import Rock
10
 from intelligine.synergy.object.Rock import Rock
11
 from intelligine.synergy.object.ant.Egg import Egg
11
 from intelligine.synergy.object.ant.Egg import Egg
12
 from os import getcwd
12
 from os import getcwd
13
-from xyzworld.cst import PREVIOUS_DIRECTION
13
+from synergine_xyz.cst import PREVIOUS_DIRECTION
14
 
14
 
15
 SURFACE_PHEROMONE_HOME = 'pheromone_home'
15
 SURFACE_PHEROMONE_HOME = 'pheromone_home'
16
 SURFACE_PHEROMONE_EXPLORATION = 'pheromone_exploration'
16
 SURFACE_PHEROMONE_EXPLORATION = 'pheromone_exploration'

+ 1 - 1
intelligine/simulation/object/brain/part/move/AntMoveBrainPart.py 查看文件

1
 from intelligine.simulation.object.brain.part.move.MoveBrainPart import MoveBrainPart
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
 from intelligine.core.exceptions import NoPheromone
3
 from intelligine.core.exceptions import NoPheromone
4
 from intelligine.cst import PHEROMONE_SEARCHING, MOVE_MODE_EXPLO, COL_TRANSPORTER_NOT_CARRYING, COL_TRANSPORTER_CARRYING
4
 from intelligine.cst import PHEROMONE_SEARCHING, MOVE_MODE_EXPLO, COL_TRANSPORTER_NOT_CARRYING, COL_TRANSPORTER_CARRYING
5
 from intelligine.simulation.pheromone.DirectionPheromone import DirectionPheromone
5
 from intelligine.simulation.pheromone.DirectionPheromone import DirectionPheromone

+ 1 - 1
intelligine/simulation/object/brain/part/move/MoveBrainPart.py 查看文件

2
 from intelligine.simulation.object.brain.part.BrainPart import BrainPart
2
 from intelligine.simulation.object.brain.part.BrainPart import BrainPart
3
 from intelligine.synergy.event.move.direction import directions_same_level, directions_slighty
3
 from intelligine.synergy.event.move.direction import directions_same_level, directions_slighty
4
 from random import randint, choice, randrange
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
 class MoveBrainPart(BrainPart):
8
 class MoveBrainPart(BrainPart):

+ 1 - 1
intelligine/simulation/object/brain/part/transport/AntPutBrainPart.py 查看文件

2
 from intelligine.cst import MOVE_MODE_EXPLO, TYPE_RESOURCE_TRANSFORMABLE, CARRIED
2
 from intelligine.cst import MOVE_MODE_EXPLO, TYPE_RESOURCE_TRANSFORMABLE, CARRIED
3
 from intelligine.simulation.object.brain.part.transport.TransportBrainPart import TransportBrainPart
3
 from intelligine.simulation.object.brain.part.transport.TransportBrainPart import TransportBrainPart
4
 from intelligine.synergy.object.Food import Food
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
 class AntPutBrainPart(TransportBrainPart):
8
 class AntPutBrainPart(TransportBrainPart):

+ 1 - 1
intelligine/simulation/pheromone/DirectionPheromone.py 查看文件

1
 from intelligine.cst import PHEROMON_DIRECTION, PHEROMON_POSITIONS
1
 from intelligine.cst import PHEROMON_DIRECTION, PHEROMON_POSITIONS
2
 from intelligine.core.exceptions import NoPheromone
2
 from intelligine.core.exceptions import NoPheromone
3
 from random import shuffle
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
 from intelligine.synergy.event.move.direction import get_direction_for_degrees
5
 from intelligine.synergy.event.move.direction import get_direction_for_degrees
6
 
6
 
7
 
7
 

+ 1 - 1
intelligine/synergy/ColonyConfiguration.py 查看文件

1
 from synergine.synergy.collection.Configuration import Configuration
1
 from synergine.synergy.collection.Configuration import Configuration
2
 from intelligine.synergy.object.ant.Ant import Ant
2
 from intelligine.synergy.object.ant.Ant import Ant
3
 from intelligine.cst import ALIVE, COLONY
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
 class ColonyConfiguration(Configuration):
7
 class ColonyConfiguration(Configuration):

+ 1 - 1
intelligine/synergy/Simulation.py 查看文件

1
 from synergine.synergy.Simulation import Simulation as BaseSimulation
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
 #from intelligine.synergy.event.attack.NearAttackableAction import NearAttackableAction
3
 #from intelligine.synergy.event.attack.NearAttackableAction import NearAttackableAction
4
 from intelligine.synergy.event.transport.PutableAction import PutableAction
4
 from intelligine.synergy.event.transport.PutableAction import PutableAction
5
 from intelligine.synergy.event.transport.TakeableAction import TakeableAction
5
 from intelligine.synergy.event.transport.TakeableAction import TakeableAction

+ 1 - 1
intelligine/synergy/event/attack/NearAttackableEvent.py 查看文件

1
 from intelligine.core.exceptions import NearNothingFound
1
 from intelligine.core.exceptions import NearNothingFound
2
 from synergine.core.exceptions import NotConcernedEvent
2
 from synergine.core.exceptions import NotConcernedEvent
3
 from intelligine.synergy.event.src.NearEvent import NearEvent
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
 from intelligine.cst import ATTACKABLE, COLONY, COL_FIGHTER, BRAIN_PART_ATTACK
5
 from intelligine.cst import ATTACKABLE, COLONY, COL_FIGHTER, BRAIN_PART_ATTACK
6
 
6
 
7
 
7
 

+ 1 - 1
intelligine/synergy/event/move/MoveAction.py 查看文件

2
 from intelligine.synergy.event.move.MoveEvent import MoveEvent
2
 from intelligine.synergy.event.move.MoveEvent import MoveEvent
3
 from synergine.synergy.event.exception.ActionAborted import ActionAborted
3
 from synergine.synergy.event.exception.ActionAborted import ActionAborted
4
 from intelligine.cst import BRAIN_PART_MOVE
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
 class MoveAction(Action):
8
 class MoveAction(Action):

+ 1 - 1
intelligine/synergy/event/move/MoveEvent.py 查看文件

4
 from intelligine.synergy.event.Event import Event
4
 from intelligine.synergy.event.Event import Event
5
 from synergine.core.simulation.mechanism.Mechanism import Mechanism
5
 from synergine.core.simulation.mechanism.Mechanism import Mechanism
6
 from intelligine.cst import COL_WALKER, BRAIN_SCHEMA, BRAIN_PART_MOVE
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
 class MoveEvent(Event):
10
 class MoveEvent(Event):

+ 1 - 1
intelligine/synergy/event/src/NearEvent.py 查看文件

1
 from intelligine.core.exceptions import NearNothingFound
1
 from intelligine.core.exceptions import NearNothingFound
2
 from intelligine.synergy.event.Event import Event
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
 class NearEvent(Event):
6
 class NearEvent(Event):

+ 1 - 1
intelligine/synergy/event/transport/PutableEvent.py 查看文件

2
 from intelligine.synergy.event.src.NearEvent import NearEvent
2
 from intelligine.synergy.event.src.NearEvent import NearEvent
3
 from synergine.core.exceptions import NotConcernedEvent
3
 from synergine.core.exceptions import NotConcernedEvent
4
 from intelligine.cst import CANT_PUT_STILL, COL_TRANSPORTER_CARRYING, TRANSPORTABLE, BRAIN_SCHEMA, BRAIN_PART_PUT
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
 class PutableEvent(NearEvent):
8
 class PutableEvent(NearEvent):

+ 1 - 1
intelligine/synergy/event/transport/TakeableEvent.py 查看文件

1
 from intelligine.core.exceptions import NearNothingFound
1
 from intelligine.core.exceptions import NearNothingFound
2
 from synergine.core.exceptions import NotConcernedEvent
2
 from synergine.core.exceptions import NotConcernedEvent
3
 from intelligine.synergy.event.src.NearEvent import NearEvent
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
 from intelligine.cst import TRANSPORTABLE, CANT_CARRY_STILL, COL_TRANSPORTER_NOT_CARRYING, BRAIN_SCHEMA, BRAIN_PART_TAKE
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 查看文件

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

+ 1 - 1
intelligine/synergy/object/Rock.py 查看文件

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

+ 1 - 1
intelligine/synergy/object/Transportable.py 查看文件

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

+ 0 - 1
modules/lifegame 查看文件

1
-../../synergine/modules/lifegame

+ 0 - 1
modules/stigengine 查看文件

1
-../../stigengine/stigengine

+ 0 - 1
modules/synergine 查看文件

1
-../../synergine/synergine

+ 0 - 1
modules/xyworld 查看文件

1
-../../synergine/modules/xyworld

+ 0 - 1
modules/xyzworld 查看文件

1
-../../synergine/modules/xyzworld

+ 2 - 0
requirements.txt 查看文件

1
+synergine>=0.0.1
2
+synergine_xyz>=0.0.1

+ 1 - 5
run.py 查看文件

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
 from synergine.core.Core import Core
1
 from synergine.core.Core import Core
6
 from config import config
2
 from config import config
7
 
3
 
8
 if __name__ == '__main__':
4
 if __name__ == '__main__':
9
-    Core.start_core(config, modules_path='modules')
5
+    Core.start_core(config)

+ 2 - 2
tests_requirements.txt 查看文件

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