public string Encode() { StringEncoderBuilder sb = new StringEncoderBuilder("."); sb.Append(siteId); sb.Append(pos.x); sb.Append(pos.y); sb.Append(radius); return(sb.Build()); }
public string Encode() { StringEncoderBuilder sb = new StringEncoderBuilder("|"); sb.Append(sites.Count); for (int i = 0; i < sites.Count; i++) { sb.Append(sites[i].Encode()); } return(sb.Build()); }
public string Encode() { StringEncoderBuilder result = new StringEncoderBuilder("."); if (pos == null) { pos = new Position(); } result.Append(pos.x); result.Append(pos.y); result.Append((int)owner); result.Append((int)unitType); result.Append(health); return(result.Build()); }
public string Encode() { StringEncoderBuilder result = new StringEncoderBuilder("."); result.Append(siteId); result.Append(gold); result.Append(maxMineSize); result.Append((int)structureType); result.Append((int)owner); result.Append((param1)); result.Append((int)creepsType); result.Append(isMinedOut); return(result.Build()); }
public string Encode() { StringEncoderBuilder result = new StringEncoderBuilder("|"); int noOfSites = sites.Count; result.Append(noOfSites); for (int i = 0; i < sites.Count; i++) { result.Append(sites[i].Encode()); } int noOfUnits = units.Count; result.Append(noOfUnits); for (int i = 0; i < units.Count; i++) { result.Append(units[i].Encode()); } result.Append(money); result.Append(touchedSiteId); return(result.Build()); }