<commit_before><?php

namespace ShipsUnburned\Model\Entity;


class Game implements GameInterface
{
    public $gamefield;
    
    public function getGameField()
    {
        return $this->gamefield;
    }
    
    public function setGameField(Array $gamefield)
    {
        $this->gamefield = $gamefield;
    }
}
<commit_msg>added 2 dimensional array and a function to fill it with given array<commit_after><?php

namespace ShipsUnburned\Model\Entity;


class Game implements GameInterface
{
    public $gamefield;
    
    public function getGameField()
    {
        return $this->gamefield;
    }
    
    public function setGameField()
    {
        $a = array(); 
        $b = array(); 
        $b = array_pad($b,12,0); 
        $a = array_pad($a,12,$b); 
        
        $this->gamefield = $a;
    }
    /**
     * Insert Ships into the 2 dimensional array
     * @param array $array
     */
    public function insertShipsIntoGameField(array $array)
    {
        $gamefield = $this->gamefield;
        
        //Go through the gamefield
        for ($i = 0; $i < count($gamefield); $i++)
        {
            //When array[$i] has values go into next for loop
            if ($array[$i] != null)
            {
                //Go through the value/s
                for ($j = 0; $k < count($array[$i]); $j++)
                {
                    //Set Gamefield = 1 where gamefield[$i] and the value of $array[$i][$j]
                    $gamefield[$i][$array[$i][$j]] = 1;
                }
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.12402597402597403, 'fraction_numerical': 0.007142857142857143, 'mean_word_length': 1.7082601054481548, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, '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': '2494643', 'n_tokens_mistral': 476, 'n_tokens_neox': 457, 'n_words': 119}