Exemplo n.º 1
0
 public CombatHelper(IHommRobot robot)
 {
     this.robot   = robot;
     world        = robot.World;
     player       = robot.Player;
     hommEngine   = world.HommEngine;
     commonEngine = world.CommonEngine;
 }
Exemplo n.º 2
0
 public RoundToUnityConnecter(IHommEngine hommEngine, ICommonEngine commonEngine,
                              IHommUserInterfaceEngine uiEngine, HommObjectsCreationHelper objectsCreationHelper)
 {
     this.uiEngine              = uiEngine;
     this.hommEngine            = hommEngine;
     this.commonEngine          = commonEngine;
     this.objectsCreationHelper = objectsCreationHelper;
 }
Exemplo n.º 3
0
        public MovementHelper(IHommRobot robot, Direction movementDirection)
        {
            this.robot             = robot;
            this.movementDirection = movementDirection;

            world        = robot.World;
            hommEngine   = world.HommEngine;
            commonEngine = world.CommonEngine;
            player       = robot.Player;
            map          = world.Round.Map;

            newLocation      = player.Location.NeighborAt(movementDirection);
            movementDuration = GetTravelDuration(player, map);
        }
Exemplo n.º 4
0
        public Tuple <Location, double> TryMoveHero(IHommEngine engine, Player player, Map map)
        {
            var newLocation  = player.Location.NeighborAt(MovementDirection);
            var turnDuration = GetTravelDuration(player, map);

            var travelIsPossible = newLocation.IsInside(map.Size) &&
                                   (map[newLocation].tileObject?.IsPassable ?? false);

            if (travelIsPossible)
            {
                engine.Move(player.Name, MovementDirection, turnDuration);
                return(Tuple.Create(newLocation, turnDuration));
            }

            return(Tuple.Create(player.Location, turnDuration));
        }
Exemplo n.º 5
0
 public HommObjectsCreationHelper(Random random, IHommEngine engine)
 {
     this.random = random;
     this.engine = engine;
 }
Exemplo n.º 6
0
 public Tuple <Location, double> TryMoveHero(IHommEngine engine, Player player, Map map)
 {
     return(Tuple.Create(player.Location, HommRules.Current.WaitDuration));
 }