public static CommandStream FromStream(ReplayReader stream) { var cstream = new CommandStream { ops = new List <Op>((int)stream.Length / 9) }; try { Op op; do { op = Op.FromStream(stream); cstream.Add(op); } while (op.Type != CMDST.EndGame); } catch (EndOfStreamException) { } return(cstream); }
private CommandStream parseCommandStream() { return(CommandStream.FromStream(_stream)); }