<commit_before>﻿using CatSkald.Roguelike.Core.Parameters;
using CatSkald.Roguelike.Core.Services;
using CatSkald.Roguelike.Core.Terrain;
using NLog;

namespace CatSkald.Roguelike.GameProcessor.Initialization
{
    public class Processor : IProcessor
    {
        private readonly IMapPainter painter;
        private readonly IDungeonPopulator populator;
        private readonly IMapBuilder builder;
        private static Logger Log = LogManager.GetCurrentClassLogger();

        public Processor(
            IMapBuilder builder, 
            IDungeonPopulator populator,
            IMapPainter painter)
        {
            this.builder = builder;
            this.populator = populator;
            this.painter = painter;
        }

        public IDungeon Dungeon { get; private set; }
        public string Message { get; private set; }

        public void Initialize(DungeonParameters parameters)
        {
            Dungeon = builder.Build(parameters);
            populator.Fill(Dungeon);
            Log.Debug("Dungeon initialized.");
        }

        public bool Process()
        {
            painter.DrawMap(Dungeon);
            painter.DrawMessage("Welcome to our dungeon, brave Hero!");<commit_msg>Small refactoring.<commit_after>﻿using CatSkald.Roguelike.Core.Parameters;
using CatSkald.Roguelike.Core.Services;
using CatSkald.Roguelike.Core.Terrain;
using NLog;

namespace CatSkald.Roguelike.GameProcessor.Initialization
{
    public class Processor : IProcessor
    {
        private readonly IMapPainter painter;
        private readonly IDungeonPopulator populator;
        private readonly IMapBuilder builder;
        private static Logger Log = LogManager.GetCurrentClassLogger();

        public Processor(
            IMapBuilder builder, 
            IDungeonPopulator populator,
            IMapPainter painter)
        {
            this.builder = builder;
            this.populator = populator;
            this.painter = painter;
        }

        public IDungeon Dungeon { get; private set; }
        public string Message { get; private set; }

        public void Initialize(DungeonParameters parameters)
        {
            var dungeon = builder.Build(parameters);
            populator.Fill(dungeon);
            Dungeon = dungeon;
            Log.Debug("Dungeon initialized.");
        }

        public bool Process()
        {
            painter.DrawMap(Dungeon);
            painter.DrawMessage("Welcome to our dungeon, brave Hero!");
{'fraction_non_alphanumeric': 0.07269076305220884, 'fraction_numerical': 0.0, 'mean_word_length': 2.2647444298820445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4257533', 'n_tokens_mistral': 661, 'n_tokens_neox': 638, 'n_words': 155}