<commit_before>package com.floor13.game.core

import com.floor13.game.core.map.Map
import com.floor13.game.core.map.Tile
import com.floor13.game.core.creatures.Creature
import com.floor13.game.core.creatures.Cyborg
import com.floor13.game.core.actions.Action

class World(
        val floors: Array<Map>,
        val mainCharacter: Cyborg,
        val creatures: MutableList<Creature> = mutableListOf(mainCharacter as Creature)
) {
	val currentFloor: Map
		get() = floors[mainCharacter.floor]
	
    // TODO: add main character name
    fun tick(): List<Action> {
        val appliedActions = mutableListOf<Action>()
        for (creature in creatures) {
            creature.energyPoints += ENERGY_PER_TICK
            creature.nextAction?.let {
                if (it.energyCost < creature.energyPoints) {
                    it.apply()
                    creature.energyPoints -= it.energyCost
                    appliedActions.add(it)
                }
				creature.nextAction = null
            }

        }
        return appliedActions
    }

    companion object {
        val ENERGY_PER_TICK = 10
    }
}
<commit_msg>Current level exploration updating added<commit_after>package com.floor13.game.core

import com.floor13.game.core.map.Map
import com.floor13.game.core.map.Tile
import com.floor13.game.core.creatures.Creature
import com.floor13.game.core.creatures.Cyborg
import com.floor13.game.core.actions.Action

class World(
        val floors: Array<Map>,
        val mainCharacter: Cyborg,
        val creatures: MutableList<Creature> = mutableListOf(mainCharacter as Creature)
) {
	val currentFloor: Map
		get() = floors[mainCharacter.floor]

	init {
		currentFloor.updateExplored(mainCharacter.calculateFieldOfView(currentFloor))
	}
	
    // TODO: add main character name
    fun tick(): List<Action> {
        val appliedActions = mutableListOf<Action>()
        for (creature in creatures) {
            creature.energyPoints += ENERGY_PER_TICK
            creature.nextAction?.let {
                if (it.energyCost < creature.energyPoints) {
                    it.apply()
                    creature.energyPoints -= it.energyCost
                    appliedActions.add(it)
                }
				creature.nextAction = null

				currentFloor.updateExplored(mainCharacter.calculateFieldOfView(currentFloor))
            }

        }
        return appliedActions
    }

    companion object {
        val ENERGY_PER_TICK = 10
    }
}

{'fraction_non_alphanumeric': 0.08957654723127036, 'fraction_numerical': 0.011400651465798045, 'mean_word_length': 2.3565573770491803, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '397279', 'n_tokens_mistral': 752, 'n_tokens_neox': 703, 'n_words': 137}