<commit_before>﻿using System;

namespace KataNetHack.Console.Input
{
    public class Input
    {
        public Func<ConsoleKeyInfo> ReadKey = () => System.Console.ReadKey(intercept:true);

        public event Action<InputResult> InputReceived;

        public void PollForInput()
        {
            InputResult inputReceived;
            var key = ReadKey();

            switch (key.Key)
            {
                case ConsoleKey.W:
                    inputReceived = InputResult.Up;
                    break;
                case ConsoleKey.A:
                    inputReceived = InputResult.Left;
                    break;
                case ConsoleKey.S:
                    inputReceived = InputResult.Down;
                    break;
                case ConsoleKey.D:
                    inputReceived = InputResult.Right;
                    break;
                default:
                    inputReceived = InputResult.Invalid;
                    break;
            }

            if (inputReceived != InputResult.Invalid)
                InputReceived?.Invoke(inputReceived);
        }
    }
}<commit_msg>[BOYSCOUT] Format Input code<commit_after>﻿using System;

namespace KataNetHack.Console.Input
{
    public class Input
    {
        public Func<ConsoleKeyInfo> ReadKey = () => System.Console.ReadKey(intercept:true);

        public event Action<InputResult> InputReceived;

        public void PollForInput()
        {
            InputResult inputReceived;
            var key = ReadKey();

            switch(key.Key)
            {
                case ConsoleKey.W:
                    inputReceived = InputResult.Up;
                    break;
                case ConsoleKey.A:
                    inputReceived = InputResult.Left;
                    break;
                case ConsoleKey.S:
                    inputReceived = InputResult.Down;
                    break;
                case ConsoleKey.D:
                    inputReceived = InputResult.Right;
                    break;
                default:
                    inputReceived = InputResult.Invalid;
                    break;
            }

            if(inputReceived != InputResult.Invalid)
                InputReceived?.Invoke(inputReceived);
        }
    }
}
{'fraction_non_alphanumeric': 0.07108380868802106, 'fraction_numerical': 0.0, 'mean_word_length': 1.2265625, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '2471341', 'n_tokens_mistral': 548, 'n_tokens_neox': 504, 'n_words': 107}