//number of titt values read public static int teeUp(String line) { int colon = line.IndexOf(':'); if (colon == -1) { ArchonGame.writeError(ERROR_TAG, "Invalid Line:" + line); ArchonGame.exit(); return(-1); } int i = 0; int lastMatch = colon + 1; for (i = 0; i < 3; i++) { int comma = line.IndexOf(',', lastMatch); if (comma == -1) { break; } tee[i] = line.Substring(lastMatch, comma - lastMatch).Trim(); lastMatch = comma + 1; } tee[i] = line.Substring(lastMatch).Trim(); return(i + 1); }
public static string readValue(String line) { int colon = line.IndexOf(':'); if (colon == -1) { ArchonGame.writeError(ERROR_TAG, "Invalid Line:" + line); ArchonGame.exit(); return(null); } return(line.Substring(colon + 1).Trim()); }