示例#1
0
        public void Generate()
        {
            HistoricalDataPoint dataPoint = new HistoricalDataPoint(round.FightResult());

            AddDatapoint(dataPoint);
            this.Size++;

            string history = "history.csv";

            File.AppendAllText(history, dataPoint.DataPoint + "\n");
        }
示例#2
0
        public void Load()
        {
            string file = "history.csv";

            if (File.Exists(file))
            {
                string[] historialData = System.IO.File.ReadAllLines(file);
                foreach (var item in historialData)
                {
                    HistoricalDataPoint nextDataPoint = new HistoricalDataPoint(item);
                    AddDatapoint(nextDataPoint);
                    this.Size++;
                }
            }
            else
            {
                var myFile = File.Create(file);
                myFile.Close();
            }
        }
示例#3
0
 internal void AddDatapoint(HistoricalDataPoint dataPoint)
 {
     _DataPoints.Add(dataPoint);
 }