コード例 #1
0
 public bool getFromNeighbour()
 {
     if (neighbor != null)
     {
         MaterialHolder neighbourPresent = neighbor.takeMaterial(materialHolded, grabCount);
         addMaterial(neighbourPresent.getMaterialId(), neighbourPresent.getCount());
         return(true);
     }
     return(false);
 }
コード例 #2
0
        public override string ToString()
        {
            String desc = String.Empty;

            if (materialHolded != null)
            {
                desc += String.Format("EQ: {0} {1} {2}", materialHolded.getMaterialId(), materialHolded.getCount(), Environment.NewLine);
            }
            else
            {
                desc += String.Format("EQ: Nothing {0}", Environment.NewLine);
            }

            return(desc);
        }