public bool getFromNeighbour() { if (neighbor != null) { MaterialHolder neighbourPresent = neighbor.takeMaterial(materialHolded, grabCount); addMaterial(neighbourPresent.getMaterialId(), neighbourPresent.getCount()); return(true); } return(false); }
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); }