<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace PlayerRank
{
    public class Game
    {
        private readonly Dictionary<string, Points> m_Scores = new Dictionary<string, Points>();

        public void AddResult(string name, double score)
        {
            if (m_Scores.ContainsKey(name))
            {
                m_Scores[name] = new Points(score);
            }
            else
            {
                m_Scores.Add(name, new Points(score));
            }
        }

        public void AddResult(string name, Points points)
        {
            if (m_Scores.ContainsKey(name))
            {
                m_Scores[name] = points;
            }
            else
            {
                m_Scores.Add(name, points);
            }
        }

        internal Dictionary<string, double> GetResults()
        {
            var oldResults = new Dictionary<string, double>();
            foreach (var score in m_Scores)
            {
                oldResults.Add(score.Key, score.Value.GetValue());
            }
            return oldResults;
        }
    }
}<commit_msg>Mark old API methods in Game as obsolete<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace PlayerRank
{
    public class Game
    {
        private readonly Dictionary<string, Points> m_Scores = new Dictionary<string, Points>();
        
        public void AddResult(string name, Points points)
        {
            if (m_Scores.ContainsKey(name))
            {
                m_Scores[name] = points;
            }
            else
            {
                m_Scores.Add(name, points);
            }
        }

        internal Dictionary<string, double> GetResults()
        {
            var oldResults = new Dictionary<string, double>();
            foreach (var score in m_Scores)
            {
                oldResults.Add(score.Key, score.Value.GetValue());
            }
            return oldResults;
        }

        /// Obsolete V1 API

        [Obsolete("Please use AddResult(string, Points) instead")]
        public void AddResult(string name, double score)
        {
            if (m_Scores.ContainsKey(name))
            {
                m_Scores[name] = new Points(score);
            }
            else
            {
                m_Scores.Add(name, new Points(score));
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.09004543577034284, 'fraction_numerical': 0.0004130524576621231, 'mean_word_length': 1.4147557328015952, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5786808', 'n_tokens_mistral': 654, 'n_tokens_neox': 621, 'n_words': 145}