<commit_before>/**
 *
 * @file    grid.cpp
 * @brief   Implementation of Grid class functions
 * @author  <NAME>
 * @copyright MIT License
 *
 **/

#include <iostream>
#include <vector>
#include <random>
#include "grid.hpp"

Grid::Grid(int size) : gridSize(size) {}

void Grid::printGrid() {
    unsigned index {1};

    while(index <= grid.size()){
        
        if(grid[index-1] == *start)
            std::cout << "O ";
        else if(grid[index-1] == *destination)
            std::cout << "X ";
        else
            std::cout << "- ";

        if((index % gridSize) == 0)
            std::cout << std::endl;

        ++index;
        
    }
}

std::vector<GridPoint> Grid::findPath() {
    std::vector<GridPoint> path;

    return path;
}<commit_msg>Initialize grid within Grid comstructor<commit_after>/**
 *
 * @file    grid.cpp
 * @brief   Implementation of Grid class functions
 * @author  <NAME>
 * @copyright MIT License
 *
 **/

#include <iostream>
#include <vector>
#include <random>
#include "grid.hpp"

Grid::Grid(int size) : gridSize(size) {

    for(int i=0; i<size; i++) {
        for(int j=0; j<size; j++) {
            GridPoint p(i,j);
            grid.push_back(p);
        }
    }

}

void Grid::printGrid() {
    unsigned index {1};

    while(index <= grid.size()){
        
        if(grid[index-1] == *start)
            std::cout << "O ";
        else if(grid[index-1] == *destination)
            std::cout << "X ";
        else
            std::cout << "- ";

        if((index % gridSize) == 0)
            std::cout << std::endl;

        ++index;

    }
}

std::vector<GridPoint> Grid::findPath() {
    std::vector<GridPoint> path;

    return path;
}
{'fraction_non_alphanumeric': 0.17375886524822695, 'fraction_numerical': 0.00591016548463357, 'mean_word_length': 2.158582089552239, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 15, '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': '3891681', 'n_tokens_mistral': 571, 'n_tokens_neox': 558, 'n_words': 125}