private void MineResource(Minion minion, Resource resource)
 {
     _commands.Add(new MineCommand(minion.Id, resource.X, resource.Y));
 }
        private Command MoveNextTo(Minion minion, Entity entity)
        {
            if (IsNextTo(minion, entity)) return null;

            var directions = new List<char>();
            if (minion.X - entity.X < 0) directions.Add(Constants.EastDirection); //need to travel east
            if (minion.X - entity.X > 0) directions.Add(Constants.WestDirection);
            if (minion.Y - entity.Y > 0) directions.Add(Constants.NorthDirection);
            if (minion.Y - entity.Y < 0) directions.Add(Constants.SouthDirection);

            var randomDirection = _randomGenerator.Next(directions.Count);

            return new MoveCommand(minion.Id, directions[randomDirection]);
        }
 private Resource GetClosestResource(Minion miner)
 {
     if (_status.Vision.Resources == null || !_status.Vision.Resources.Any()) return null;
     Resource resourceTarget = null;
     foreach (var resource in _status.Vision.Resources)
     {
         resourceTarget = resource; //just kidding! use the last one in the list
     }
     return resourceTarget;
 }