using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using bbiwarg.Detectors.Fingers;
using bbiwarg.Utility;

namespace bbiwarg.Detectors.Touch
{
    class TouchEvent
    {
        public Vector2D Position { get; private set; }
        public float FloodValue { get; private set; }
        public Finger Finger { get; private set; }

        public TouchEvent(Vector2D position, float floodValue, Finger finger)
        {
            Position = position;
            FloodValue = floodValue;
            Finger = finger;
        }

        public bool isSimilarTo(TouchEvent compareTouchEvent)
        {
            float maxDistance = 20;
            float distance = Position.getDistanceTo(compareTouchEvent.Position);
            return (distance < maxDistance);
        }
    }
}
