<commit_before>﻿using SFML.Graphics;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace The_Binding_Of_ROB
{
    class Map
    {
        Sprite[,] tiles1;
        Sprite[,] tiles2;
        Sprite[,] tiles3;
        int mapWidth = 100;
        int mapHeight = 100;

        public Map()
        {
            int tilemapWidth = 32;
            int tilemapHeight = 32;
            int tileSize = 32;

            Texture texture = new Texture(@"Sprites\Terrain\terrain_atlas.png");
            Sprite[] tilemap = new Sprite[tilemapWidth * tilemapHeight];

            for(int y = 0; y < tilemapHeight; y++)
            {
                for(int x = 0; x < tilemapWidth; x++)
                {
                    IntRect rect = new IntRect(x * tileSize, y * tileSize, tileSize, tileSize);
                    tilemap[(y * tilemapWidth) + x] = new Sprite(texture, rect);
                }
            }

            tiles1 = new Sprite[mapWidth, mapHeight];
            StreamReader readLayer1 = new StreamReader(@"C:\Users\Robbert\SkyDrive\The_Binding_Of_ROB\The_Binding_Of_ROB\The_Binding_Of_ROB\Maps\TestMap_Tilelaag 1.csv");
            reading(readLayer1, tilemap, tileSize, tiles1);
            readLayer1.Close();

            tiles2 = new Sprite[mapWidth, mapHeight];
            StreamReader readLayer2 = new StreamReader(@"C:\Users\Robbert\SkyDrive\The_Binding_Of_ROB\The_Binding_Of_ROB\The_Binding_Of_ROB\Maps\TestMap_Tilelaag 2.csv");
            reading(readLayer2, tilemap, tileSize, tiles2);
            readLayer2.Close();

            tiles3 = new Sprite[mapWidth, mapHeight];
            StreamReader readLayer3 = new StreamReader(@"C:\Users\Robbert\SkyDrive\The_Binding_Of_ROB\The_Binding_Of_ROB\The_Binding_Of_ROB\Maps\TestMap_Tilelaag 3.csv");
            reading(readLayer3, tilemap, tileSize, tiles3);
            readLayer2.Close();
        }

        public void reading(StreamReader reader, Sprite[] tilemap, int tileSize, Sprite[,] tiles)<commit_msg>pffffffffffffffffff<commit_after>﻿using SFML.Graphics;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace The_Binding_Of_ROB
{
    class Map
    {
        Sprite[,] tiles1;
        Sprite[,] tiles2;
        Sprite[,] tiles3;
        int mapWidth = 100;
        int mapHeight = 100;

        public Map()
        {
            int tilemapWidth = 32;
            int tilemapHeight = 32;
            int tileSize = 32;

            Texture texture = new Texture(@"Sprites\Terrain\terrain_atlas.png");
            Sprite[] tilemap = new Sprite[tilemapWidth * tilemapHeight];

            for(int y = 0; y < tilemapHeight; y++)
            {
                for(int x = 0; x < tilemapWidth; x++)
                {
                    IntRect rect = new IntRect(x * tileSize, y * tileSize, tileSize, tileSize);
                    tilemap[(y * tilemapWidth) + x] = new Sprite(texture, rect);
                }
            }

            tiles1 = new Sprite[mapWidth, mapHeight];
            StreamReader readLayer1 = new StreamReader(@"Maps\TestMap_Tilelaag 1.csv");
            reading(readLayer1, tilemap, tileSize, tiles1);
            readLayer1.Close();

            tiles2 = new Sprite[mapWidth, mapHeight];
            StreamReader readLayer2 = new StreamReader(@"Maps\TestMap_Tilelaag 2.csv");
            reading(readLayer2, tilemap, tileSize, tiles2);
            readLayer2.Close();

            tiles3 = new Sprite[mapWidth, mapHeight];
            StreamReader readLayer3 = new StreamReader(@"Maps\TestMap_Tilelaag 3.csv");
            reading(readLayer3, tilemap, tileSize, tiles3);
            readLayer2.Close();
        }

        public void reading(StreamReader reader, Sprite[] tilemap, int tileSize, Sprite[,] tiles)
{'fraction_non_alphanumeric': 0.1017733230531997, 'fraction_numerical': 0.01799023387304035, 'mean_word_length': 2.2059308072487642, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '6976797', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1147, 'n_words': 257}