<commit_before>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TeamWork.ExceptionClass;

namespace TeamWork.InfoAndInitialisation
{
    public abstract class Hit
    {
        public static string hitLetter;

        public static void FlashScreen()
        {
            Console.Beep();
            for (int i = 0; i < 3; i++)
            {
                Console.Clear();
                Console.BackgroundColor = ConsoleColor.Red;
                Thread.Sleep(100);
                Console.Clear();
                Console.BackgroundColor = ConsoleColor.Black;
                Thread.Sleep(100);
                Console.Clear();
            }
        }

        public static bool Questions(Letters letter)
        {
            Random rand = new Random();
            int number = rand.Next(1, 4);
            string pressedKey;

            Console.Clear();

            string s = @"D:\Study\_TELERIK\TeamWork\TeamWork-master\TeamWork-master\TeamWork\Questions\" + letter.RandomEnumeration.ToString().ToUpper() + "\\" + number + ".txt";
            StreamReader sr = new StreamReader(@s, Encoding.Default);
            var text = File.ReadAllLines(@s);

            foreach (var line in text)
            {
                Console.WriteLine(line);
            }

            do
            {
                Console.Write("Enter your answer: ");
                pressedKey = Console.ReadLine();
            } while (!Validator.CheckIfCorrectAnswerFormat(pressedKey));


            if (int.Parse(pressedKey) == number)
            {
                Console.WriteLine("You pass !");
                Console.ReadKey();
                return true;
            }
            else
            {
                Console.WriteLine("You failed !");
                GetQuestion.ChooseQuestionByLetter(hitLetter);
                Console.ReadKey();
                return false;
            }
        }<commit_msg>Fixed bugs<commit_after>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TeamWork.ExceptionClass;

namespace TeamWork.InfoAndInitialisation
{
    public abstract class Hit
    {
        public static string hitLetter;

        public static void FlashScreen()
        {
            Console.Beep();
            for (int i = 0; i < 3; i++)
            {
                Console.Clear();
                Console.BackgroundColor = ConsoleColor.Red;
                Thread.Sleep(100);
                Console.Clear();
                Console.BackgroundColor = ConsoleColor.Black;
                Thread.Sleep(100);
                Console.Clear();
            }
        }

        public static bool Questions(Letters letter)
        {
            Random rand = new Random();
            int number = rand.Next(1, 4);
            string pressedKey;

            Console.Clear();

            string s = @"D:\Study\_TELERIK\TeamWork\TeamWork-master\TeamWork-master\TeamWork\Questions\" + letter.RandomEnumeration.ToString().ToUpper() + "\\" + number + ".txt";
            StreamReader sr = new StreamReader(@s, Encoding.Default);
            var text = File.ReadAllLines(@s);

            foreach (var line in text)
            {
                Console.WriteLine(line);
            }

            do
            {
                Console.Write("Enter your answer: ");
                pressedKey = Console.ReadLine();
            } while (!Validator.CheckIfCorrectAnswerFormat(pressedKey));


            if (int.Parse(pressedKey) == number)
            {
                Console.WriteLine("You pass !");
                Console.ReadKey();
                return true;
            }
            else
            {
                Console.WriteLine("You failed !");
                Console.WriteLine("Correct answer is " + number + " !");
                GetQuestion.ChooseQuestionByLetter(hitLetter);
                Console.ReadKey();
                return false;
            }
        }
{'fraction_non_alphanumeric': 0.10203587009209888, 'fraction_numerical': 0.004847309743092583, 'mean_word_length': 1.5012121212121212, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4795030', 'n_tokens_mistral': 1062, 'n_tokens_neox': 972, 'n_words': 217}