예제 #1
0
 public Instruction.Result Pack()
 {
     // if (!Packer) return Instruction.Result.ERROR;
     Instruction.Result result = Instruction.Result.ERROR;
     if (container is GridContainer)
     {
         GridContainer target = null;
         GridContainer from   = (GridContainer)container;
         result = from.QueryAdjacentContainer(antOri, ref target);
         if (result == Instruction.Result.SUCCEED)
         {
             result = target.TryPack(this);
             if (result == Instruction.Result.SUCCEED)
             {
                 from.Release(this);
                 target.Contain(this);
                 target.HoleCheck();
             }
         }
     }
     return(result);
 }