Example #1
0
        /// <summary>
        /// Instructs the player to go away from the action point.
        /// </summary>
        public PlayerAction GoAwayFromActionPoint(Point actionPoint)
        {
            Pathfinding pathfinding = new Pathfinding();

            List<Point> neighbors = pathfinding.GetValidNeighborPoints(actionPoint);
            if (neighbors.Count > 0)
            {
                return new PlayerAction(null, neighbors[0], ActionType.Run);
            }
            else
            {
                return null;
            }
        }