﻿using System;
using System.Runtime.InteropServices;

namespace PlayerRank
{
    public class PlayerScore
    {
        public string Name { get; set; }
        public Points Points { get; internal set; }
        
        public PlayerScore(string name)
        {
            Name = name;
            Points = new Points(0);
        }

        internal void AddPoints(Points points)
        {
            Points += points;
        }

        /// Obsolete V1 API

        [Obsolete("Please use Points instead")]
        public double Score
        {
            get { return Points.GetValue(); }
            internal set { Points = new Points(value); }
        }

    }
}
﻿using System;
using System.Runtime.InteropServices;

namespace PlayerRank
{
    public class PlayerScore
    {
        public string Name { get; set; }
        public Points Points { get; internal set; }
        
        public PlayerScore(string name)
        {
            Name = name;
            Points = new Points(0);
        }

        internal void AddPoints(Points points)
        {
            Points += points;
        }

        internal void SubtractPoints(Points points)
        {
            Points -= points;
        }

        /// Obsolete V1 API

        [Obsolete("Please use Points instead")]
        public double Score
        {
            get { return Points.GetValue(); }
            internal set { Points = new Points(value); }
        }

    }
}
Add method to subtract points from player
Add method to subtract points from player
