<commit_before>package com.incrementive.splay

class Game(val config : Config) {
    private val piles: Map<PileDefinition, Pile>

    init {
        val map = mutableMapOf(config.deckReceivingPileDefinition to Pile(config.deck))
        config.otherPileDefinitions.associateByTo(map, {it}, {Pile()})
        piles = map.toMap()
    }

    fun run() = "Welcome to ${config.nameOfGame}, there are ${config.deck.size} cards in the deck."

    fun pileFor(pileDefinition: PileDefinition): Pile {
        return piles[pileDefinition] ?: throw RuntimeException()
    }

    fun moveTopCard(from: PileDefinition, to: PileDefinition) {
        pileFor(to).place(pileFor(from).draw())
    }
}<commit_msg>A more concise declaration of piles.<commit_after>package com.incrementive.splay

class Game(val config : Config) {
    private val piles = with (config) {
        otherPileDefinitions.associateBy({it}, {Pile()}) + (deckReceivingPileDefinition to Pile(deck))
    }

    fun run() = "Welcome to ${config.nameOfGame}, there are ${config.deck.size} cards in the deck."

    fun pileFor(pileDefinition: PileDefinition): Pile {
        return piles[pileDefinition] ?: throw RuntimeException()
    }

    fun moveTopCard(from: PileDefinition, to: PileDefinition) {
        pileFor(to).place(pileFor(from).draw())
    }
}
{'fraction_non_alphanumeric': 0.12213740458015267, 'fraction_numerical': 0.0, 'mean_word_length': 3.75, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1207550', 'n_tokens_mistral': 423, 'n_tokens_neox': 396, 'n_words': 95}