namespace Domain.Input {
	public abstract class InputReader {
		protected bool WasPressed;
		protected bool IsPressed;

		protected abstract int Key { get; }

		public virtual void UpdateInput() {
			WasPressed = IsPressed;
			IsPressed = Win32API.GetAsyncKeyState(Key) != 0;
		}

		public bool KeyDown() => IsPressed && !WasPressed;
	}
}