<commit_before>﻿namespace SnakeMess
{
    using System;
    using System.Diagnostics;

    public class Player
    {
        private readonly KeyMapping keyMap;

        public Player(int id)
        {
            Id = id;

            switch (id)
            {
                case 1:
                    Color = ConsoleColor.Green;
                    keyMap = new KeyMapping(ConsoleKey.UpArrow, ConsoleKey.DownArrow, ConsoleKey.LeftArrow, ConsoleKey.RightArrow);
                    break;
                case 2:
                    Color = ConsoleColor.Blue;
                    keyMap = new KeyMapping(ConsoleKey.W, ConsoleKey.S, ConsoleKey.A, ConsoleKey.D);
                    break;
            }
        }

        public ConsoleColor Color { get; set; }


        public Snake Snake { get; set; }

        public int Id { get; set; }

        private int Score { get; set; }

        private KeyMapping KeyMap { get; set; }

        public void KeyPushedCheck()
        {
            if (!Console.KeyAvailable)
            {
                return;
            }

            var keyPushed = Console.ReadKey(true);
            if (keyPushed.Equals(this.keyMap.Up))
            {
                Debug.Write("Up");
            }
            else if (keyPushed.Equals(this.keyMap.Down))
            {
                Debug.Write("Down");
            }
            else if (keyPushed.Equals(this.keyMap.Left))
            {
                Debug.Write("Left");
            }
            else if (keyPushed.Equals(this.keyMap.Left))
            {
                Debug.Write("Right");
            }
        }
    }
}<commit_msg>Fix keymap check<commit_after>﻿namespace SnakeMess
{
    using System;
    using System.Diagnostics;

    public class Player
    {
        public Player(int id)
        {
            Id = id;

            switch (id)
            {
                case 1:
                    Color = ConsoleColor.Green;
                    KeyMap = new KeyMapping(ConsoleKey.UpArrow, ConsoleKey.DownArrow, ConsoleKey.LeftArrow, ConsoleKey.RightArrow);
                    break;
                case 2:
                    Color = ConsoleColor.Blue;
                    KeyMap = new KeyMapping(ConsoleKey.W, ConsoleKey.S, ConsoleKey.A, ConsoleKey.D);
                    break;
            }
        }

        public ConsoleColor Color { get; set; }


        public Snake Snake { get; set; }

        public int Id { get; set; }

        private int Score { get; set; }

        private KeyMapping KeyMap { get; set; }

        public void KeyPushedCheck()
        {
            if (!Console.KeyAvailable)
            {
                return;
            }

            var keyPushed = Console.ReadKey(true);
            if (keyPushed.Key == KeyMap.Up && Snake.Direction != Direction.Down)
            {
                Debug.Write("Up");
            }
            else if (keyPushed.Key == KeyMap.Down && Snake.Direction != Direction.Up)
            {
                Debug.Write("Down");
            }
            else if (keyPushed.Key == KeyMap.Left && Snake.Direction != Direction.Right)
            {
                Debug.Write("Left");
            }
            else if (keyPushed.Key == KeyMap.Right && Snake.Direction != Direction.Right)
            {
                Debug.Write("Right");
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.09513868177751268, 'fraction_numerical': 0.0011929615269907546, 'mean_word_length': 1.197903014416776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6916469', 'n_tokens_mistral': 909, 'n_tokens_neox': 864, 'n_words': 192}