<commit_before>package com.philihp.weblabora.model.building;

import static com.philihp.weblabora.model.TerrainTypeEnum.COAST;
import static com.philihp.weblabora.model.TerrainTypeEnum.HILLSIDE;
import static com.philihp.weblabora.model.TerrainTypeEnum.PLAINS;

import java.util.EnumSet;
import java.util.Set;

import com.philihp.weblabora.model.Board;
import com.philihp.weblabora.model.BuildCost;
import com.philihp.weblabora.model.Player;
import com.philihp.weblabora.model.SettlementRound;
import com.philihp.weblabora.model.TerrainTypeEnum;
import com.philihp.weblabora.model.UsageParam;
import com.philihp.weblabora.model.UsageParamSingle;
import com.philihp.weblabora.model.WeblaboraException;

public class CoalHarbor extends BuildingSingleUsage {

	public CoalHarbor() {
		super("I31", SettlementRound.C, 4, "Coal Harbor", BuildCost.is().clay(1).stone(2), 0, 12,
				EnumSet.of(COAST), false);
	}

	@Override
	public void use(Board board, UsageParamSingle param) throws WeblaboraException {
		Player player = board.getPlayer(board.getActivePlayer());
	
		int iterations = param.getPeat();

		if(iterations == 0) throw new WeblaboraException(getName()+" was not supplied any peat.");
		if(iterations > 3) throw new WeblaboraException(getName()+" was supplied "+iterations+" peat, but can only consume a maximum of 3.");		
		player.subtractPeat(iterations);
		player.addCoins(3*iterations);
		player.addWhiskey(iterations);	
	}
}
<commit_msg>Fix for #100, Coal harbor now eats coal not peat.<commit_after>package com.philihp.weblabora.model.building;

import static com.philihp.weblabora.model.TerrainTypeEnum.COAST;
import static com.philihp.weblabora.model.TerrainTypeEnum.HILLSIDE;
import static com.philihp.weblabora.model.TerrainTypeEnum.PLAINS;

import java.util.EnumSet;
import java.util.Set;

import com.philihp.weblabora.model.Board;
import com.philihp.weblabora.model.BuildCost;
import com.philihp.weblabora.model.Player;
import com.philihp.weblabora.model.SettlementRound;
import com.philihp.weblabora.model.TerrainTypeEnum;
import com.philihp.weblabora.model.UsageParam;
import com.philihp.weblabora.model.UsageParamSingle;
import com.philihp.weblabora.model.WeblaboraException;

public class CoalHarbor extends BuildingSingleUsage {

	public CoalHarbor() {
		super("I31", SettlementRound.C, 4, "Coal Harbor", BuildCost.is().clay(1).stone(2), 0, 12,
				EnumSet.of(COAST), false);
	}

	@Override
	public void use(Board board, UsageParamSingle param) throws WeblaboraException {
		Player player = board.getPlayer(board.getActivePlayer());
	
		int iterations = param.getCoal();

		if(iterations == 0) throw new WeblaboraException(getName()+" was not supplied any coal.");
		if(iterations > 3) throw new WeblaboraException(getName()+" was supplied "+iterations+" coal, but can only consume a maximum of 3.");		
		player.subtractCoal(iterations);
		player.addCoins(3*iterations);
		player.addWhiskey(iterations);	
	}
}

{'fraction_non_alphanumeric': 0.11262458471760797, 'fraction_numerical': 0.008970099667774087, 'mean_word_length': 4.986083499005964, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3020325', 'n_tokens_mistral': 1111, 'n_tokens_neox': 1039, 'n_words': 195}