<commit_before>﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Cpln.Enigmos.Enigmas
{
    public class Boutton : EnigmaPanel
    {

    }
    public class TrouverEnigmaPanel : EnigmaPanel
    {
        /// <summary>
        /// Constructeur par défaut, génère un texte et l'affiche dans le Panel.
        /// </summary>
        bool bGo = false /*bRebondX = true, bRebondY = true*/, bRebondXC = true, bRebondYC = true;
        int iAxeX = 4, iAxeY = 2;
        private Timer Timer = new Timer();
        Button bCristiano = new Button();
        List<Button> buttons = new List<Button>();
        bool[] brebondYA;
        bool[] brebondXA;
        private static int clickCounter = 0;
        public TrouverEnigmaPanel()
        {
            //bGo = true;
            Label lblEnigme = new Label();
            int i = 0;
            Random random = new Random();
            for (i = 0; i < 200; i++)
            {

                Button b = new Button();
                buttons.Add(b);
                this.Controls.Add(b);
                //b.Text = "" + i;
                b.Size = new Size(100, 100);
                b.Location = new Point(random.Next(800), random.Next(600));
                b.Name = "Cristiano" + i;
                Controls.Add(b);
                b.Click += new EventHandler(b_Click);
                brebondYA = new bool[i];
                brebondXA = new bool[i];
            }

            this.BackColor = Color.FromArgb(174, 0, 1);

            bCristiano.Text = "" + 666;
            bCristiano.Size = new Size(100, 100);
            //bCristiano.Location = new Point(random.Next(700), random.Next(500));
            bCristiano.Location = new Point(400, 300);
            bCristiano.BackColor = Color.Red;
            bCristiano.Click += new EventHandler(bCristiano_Click);
            bCristiano.FlatStyle = FlatStyle.Flat;
            bCristiano.FlatAppearance.BorderColor = Color.FromArgb(174, 0, 1);
            bCristiano.BackColor = System.Drawing.Color.Transparent;
            bCristiano.ForeColor = System.Drawing.Color.Transparent;
            bCristiano.BackgroundImage = ((System.Drawing.Image)(Properties.Resources.cristiano));
            Controls.Add(bCristiano);
            lblEnigme.Font = new Font(FontFamily.GenericSansSerif, 24, FontStyle.Bold);
            lblEnigme.Dock = DockStyle.Fill;
            lblEnigme.TextAlign = ContentAlignment.MiddleCenter;
            Controls.Add(lblEnigme);

            //Mise en place d'un timer
            Timer.Interval = 1; // 1 milliseconde
            Timer.Tick += new EventHandler(Timer_Tick);
            Timer.Start();
            bGo = true;

            //lblEnigme.Text = "fesse ?";


        }
        private void b_Click(object sender, EventArgs e)
        {
            clickCounter++;
            if (clickCounter > 10) // arbitrary number
            {
                Application.Exit();
            }
        }

        private void bCristiano_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Le mot à valider est cristiano", "Yo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
        }



        private void Timer_Tick(object sender, EventArgs e)
        {
            foreach (Button b in buttons)
            {
                
                b.FlatStyle = FlatStyle.Flat;
                b.FlatAppearance.BorderColor = Color.FromArgb(174, 0, 1); 
                b.BackColor = System.Drawing.Color.Transparent;
                b.ForeColor = System.Drawing.Color.Transparent;
                b.BackgroundImage = ((System.Drawing.Image)(Properties.Resources.supermeat));
                Deplacement(b);
          
            }
            
            if (bGo == true)
                {
                    if (bCristiano.Left <= 0 || bCristiano.Right >= this.Width)<commit_msg>J'avance<commit_after>﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Cpln.Enigmos.Enigmas
{
    public class Boutton : EnigmaPanel
    {

    }
    public class TrouverEnigmaPanel : EnigmaPanel
    {
        /// <summary>
        /// Constructeur par défaut, génère un texte et l'affiche dans le Panel.
        /// </summary>
        bool bGo = false /*bRebondX = true, bRebondY = true*/, bRebondXC = true, bRebondYC = true;
        int iAxeX = 4, iAxeY = 2;
        private Timer Timer = new Timer();
        Button bCristiano = new Button();
        List<Button> buttons = new List<Button>();
        bool[] brebondYA;
        bool[] brebondXA;
        private static int clickCounter = 0;
        public TrouverEnigmaPanel()
        {
            //bGo = true;
            Label lblEnigme = new Label();
            int i = 0;
            Random random = new Random();
            for (i = 0; i < 200; i++)
            {

                Button b = new Button();
                buttons.Add(b);
                this.Controls.Add(b);
                //b.Text = "" + i;
                b.Size = new Size(100, 100);
                b.Location = new Point(random.Next(800), random.Next(600));
                b.Name = "Cristiano" + i;
                Controls.Add(b);
                brebondYA = new bool[i];
                brebondXA = new bool[i];
            }

            this.BackColor = Color.FromArgb(174, 0, 1);

            bCristiano.Text = "" + 666;
            bCristiano.Size = new Size(100, 100);
            bCristiano.Location = new Point(400, 300);
            bCristiano.BackColor = Color.Red;
            bCristiano.Click += new EventHandler(bCristiano_Click);
            bCristiano.FlatStyle = FlatStyle.Flat;
            bCristiano.FlatAppearance.BorderColor = Color.FromArgb(174, 0, 1);
            bCristiano.BackColor = System.Drawing.Color.Transparent;
            bCristiano.ForeColor = System.Drawing.Color.Transparent;
            bCristiano.BackgroundImage = ((System.Drawing.Image)(Properties.Resources.cristiano));
            Controls.Add(bCristiano);
            lblEnigme.Font = new Font(FontFamily.GenericSansSerif, 24, FontStyle.Bold);
            lblEnigme.Dock = DockStyle.Fill;
            lblEnigme.TextAlign = ContentAlignment.MiddleCenter;
            Controls.Add(lblEnigme);

            //Mise en place d'un timer
            Timer.Interval = 1; // 1 milliseconde
            Timer.Tick += new EventHandler(Timer_Tick);
            Timer.Start();
            bGo = true;

            //lblEnigme.Text = "fesse ?";



        }

        private void bCristiano_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Le mot à valider est cristiano", "Yo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
        }

       

        private void Timer_Tick(object sender, EventArgs e)
        {
            foreach (Button b in buttons)
            {
                
                b.FlatStyle = FlatStyle.Flat;
                b.FlatAppearance.BorderColor = Color.FromArgb(174, 0, 1); 
                b.BackColor = System.Drawing.Color.Transparent;
                b.ForeColor = System.Drawing.Color.Transparent;
                b.BackgroundImage = ((System.Drawing.Image)(Properties.Resources.supermeat));
                Deplacement(b);
          
            }
            
            if (bGo == true)
                {
                    if (bCristiano.Left <= 0 || bCristiano.Right >= this.Width)
{'fraction_non_alphanumeric': 0.10605659878339063, 'fraction_numerical': 0.015604337476857974, 'mean_word_length': 1.6649048625792813, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 14, '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': '6411453', 'n_tokens_mistral': 2357, 'n_tokens_neox': 2159, 'n_words': 475}