<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.TerrainTypeEnum;
import com.philihp.weblabora.model.UsageParam;
import com.philihp.weblabora.model.WeblaboraException;

public class Market extends Building {

	public Market() {
		super("F08", "", 2, "Market", BuildCost.is().stone(2), 8, 5, EnumSet.of(COAST,PLAINS,HILLSIDE), false);
	}

	@Override
	public void use(Board board, UsageParam param) throws WeblaboraException {
		Player player = board.getPlayer(board.getActivePlayer());
		if(param.differentSingularGoods() != 4)
			throw new WeblaboraException("Market requires 4 different goods, but was given "+param.differentSingularGoods());
		
		player.addBread(1);
		player.addNickel(1);
		player.addPenny(2);
	}
}
<commit_msg>fix #030, market removes goods you give it<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.TerrainTypeEnum;
import com.philihp.weblabora.model.UsageParam;
import com.philihp.weblabora.model.WeblaboraException;

public class Market extends Building {

	public Market() {
		super("F08", "", 2, "Market", BuildCost.is().stone(2), 8, 5, EnumSet.of(COAST,PLAINS,HILLSIDE), false);
	}

	@Override
	public void use(Board board, UsageParam param) throws WeblaboraException {
		Player player = board.getPlayer(board.getActivePlayer());
		if(param.differentSingularGoods() != 4)
			throw new WeblaboraException("Market requires 4 different goods, but was given "+param.differentSingularGoods());
		player.subtractAll(param);
		player.addBread(1);
		player.addNickel(1);
		player.addPenny(2);
	}
}

{'fraction_non_alphanumeric': 0.11644116441164412, 'fraction_numerical': 0.01025010250102501, 'mean_word_length': 5.0246913580246915, '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': '6719416', 'n_tokens_mistral': 916, 'n_tokens_neox': 857, 'n_words': 148}