예제 #1
0
        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);
        }
예제 #2
0
 private CommandStream parseCommandStream()
 {
     return(CommandStream.FromStream(_stream));
 }