Exemplo n.º 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");
        }
Exemplo 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();
            }
        }
Exemplo n.º 3
0
 internal void AddDatapoint(HistoricalDataPoint dataPoint)
 {
     _DataPoints.Add(dataPoint);
 }