public AddMoves ( PlayerPosition whitePos ) : void | ||
whitePos | PlayerPosition | Position of white figures on board |
return | void |
public static DebutGraph ReadDebuts(string fileName, PlayerPosition whitePos) { FileStream fs = new FileStream (fileName, FileMode.Open, FileAccess.Read); StreamReader sr = new StreamReader (fs); DebutGraph dg = new DebutGraph (); string str; while ((str = sr.ReadLine ()) != null) { if (string.IsNullOrEmpty (str)) continue; dg.AddMoves (whitePos, str.Split (',')); } sr.Close (); return dg; }
public static DebutGraph ReadDebuts(string fileName, PlayerPosition whitePos) { FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); StreamReader sr = new StreamReader(fs); DebutGraph dg = new DebutGraph(); string str; while ((str = sr.ReadLine()) != null) { if (string.IsNullOrEmpty(str)) { continue; } dg.AddMoves(whitePos, str.Split(',')); } sr.Close(); return(dg); }