<commit_before>#include "asm.h"

struct position
{
    int pos_x[100];
    int pos_y[100];
    int nom_x;
    int nom_y;
}position;

void snake(void)
{
    int score = 0;
    char score_str[6];

    struct position pos;
    pos.nom_x = Random(0x23) % 96;
    pos.nom_y = Random(pos.nom_x) % 64;

    pos.pos_x[0] = (Random(pos.nom_y) + 3) % 96 ;
    pos.pos_y[0] = Random(pos.pos_x) % 64 ;

    pos.pos_x[1] = pos.pos_x[0] - 1;
    pos.pos_y[1] = pos.pos_y[0] - 1;

    char last_key = 'd';
    char key_pressed = 'd';
        
    int collision = 0;
    while(!collision)
    {
        //Test if food is eaten
        if(pos.pos_x[0] == pos.nom_x && pos.pos_y[0] == pos.nom_y)
        {
            pos.nom_x = Random(pos.nom_y);
            pos.nom_y = Random(pos.nom_x);
}
         //Get Key_pressed

         //Drawing stuff
         int i = 0;
         while(pos.pos_x[i] != 0)
         {
            if(i == 0)
            {
                DrawCharacter('@',pos.pos_x[i],pos.pos_y[i]);
            }
            else
            {
                DrawCharacter('#',pos.pos_x[i],pos.pos_y[i]);
            }
            DrawCharacter('X',pos.nom_x,pos.nom_y);
            SignedString(score,score_str,10);           
            DrawStringz(score_str,0,0);
         }
        DrawCharacter('X',pos.nom_x,pos.nom_y);
        SignedString(score,score_str,10);           
        DrawStringz(score_str,0,0);

        //Test Collision
        if(pos.pos_x[0] < 1 || pos.pos_x[0] > 96 || pos.pos_y[0] < 1 || pos.pos_y[0] > 64)
        {
            return;
        }

        for(i = 1;pos.pos_x[i] != 0; i++)
        {
            if(pos.pos_x[0] == pos.pos_x[i] && pos.pos_y[0] == pos.pos_x[i])
            {
                return;
            }
        }
    }

}<commit_msg>Added part of controls<commit_after>#include "asm.h"

struct position
{
    int pos_x[100];
    int pos_y[100];
    int nom_x;
    int nom_y;
}position;

void snake(void)
{
    int score = 0;
    char score_str[6];

    struct position pos;
    pos.nom_x = Random(0x23) % 96;
    pos.nom_y = Random(pos.nom_x) % 64;

    pos.pos_x[0] = (Random(pos.nom_y) + 3) % 96 ;
    pos.pos_y[0] = Random(pos.pos_x) % 64 ;

    pos.pos_x[1] = pos.pos_x[0] - 1;
    pos.pos_y[1] = pos.pos_y[0] - 1;

    char last_key = 'd';
    char key_pressed = 'd';
        
    int collision = 0;
    while(!collision)
    {
        //Movement
        key_pressed = KeyboardGetChar();
        last_key = key_pressed;
        if(key_pressed == 'd')
        {
            for(int i = 0;pos.pos_x[i] != 0;i++)
            {
                pos.pos_x[i] += 1;
            }

        }
        if(key_pressed == 'w')
        {
            for(int i=0;pos.pos_y[i] != 0;i++)
            {
                pos.pos_y[i] -= 1;
            }
        }

        //Test if food is eaten
        if(pos.pos_x[0] == pos.nom_x && pos.pos_y[0] == pos.nom_y)
        {
            pos.nom_x = Random(pos.nom_y);
            pos.nom_y = Random(pos.nom_x);
        }

         //Drawing stuff
         int i = 0;
         while(pos.pos_x[i] != 0)
         {
            if(i == 0)
            {
                DrawCharacter('@',pos.pos_x[i],pos.pos_y[i]);
            }
            else
            {
                DrawCharacter('#',pos.pos_x[i],pos.pos_y[i]);
            }
            DrawCharacter('X',pos.nom_x,pos.nom_y);
            SignedString(score,score_str,10);           
            DrawStringz(score_str,0,0);
         }
        DrawCharacter('X',pos.nom_x,pos.nom_y);
        SignedString(score,score_str,10);           
        DrawStringz(score_str,0,0);

        //Test Collision
        if(pos.pos_x[0] < 1 || pos.pos_x[0] > 96 || pos.pos_y[0] < 1 || pos.pos_y[0] > 64)
        {
            return;
        }

        for(i = 1;pos.pos_x[i] != 0; i++)
        {
            if(pos.pos_x[0] == pos.pos_x[i] && pos.pos_y[0] == pos.pos_x[i])
            {
                return;
            }
        }

        timerWait(1000000);
    }

}
{'fraction_non_alphanumeric': 0.15736802601951463, 'fraction_numerical': 0.031273455091318486, 'mean_word_length': 1.4127942063971033, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6211302', 'n_tokens_mistral': 1613, 'n_tokens_neox': 1514, 'n_words': 232}