<commit_before>package curling;

import java.util.HashSet;

public class Player {
	private int order;  // What is an order?
	private Team team;
	private Role role;
	HashSet<Stone> stones;

	public Player(Team team, Role role) {
		super();
		this.team = team;
		this.role = role;

		// All players begin with 2 stones.
		stones = new HashSet<Stone>();
		stones.add(new Stone(team));
		stones.add(new Stone(team));
	}

	public void sendStone() {

	}

	// These getters/setters are for use by unit tests only.
	public Role getRole() {
		return role;
	}

	public Team getTeam() {
		return team;
	}

	public HashSet<Stone> getStones() {
		return stones;
	}
}<commit_msg>Implemented Player.sendStone, outOfStones test now passes.<commit_after>package curling;

import java.util.ArrayList;

public class Player {
	private int order;  // What is an order?
	private Team team;
	private Role role;
	ArrayList<Stone> stones;

	public Player(Team team, Role role) {
		super();
		this.team = team;
		this.role = role;

		// All players begin with 2 stones.
		stones = new ArrayList<Stone>();
		stones.add(new Stone(team));
		stones.add(new Stone(team));
	}

	public Stone sendStone() throws RuntimeException {
		Stone sentStone = null;
		try {
			sentStone = stones.get(0);
			stones.remove(0);
			stones.trimToSize();
		} catch (IndexOutOfBoundsException e) {
			throw new RuntimeException("Player.sendStone() was called, but Player has no stones.");
		}
		return sentStone;
	}

	// These getters/setters are for use by unit tests only.
	public Role getRole() {
		return role;
	}

	public Team getTeam() {
		return team;
	}

	public ArrayList<Stone> getStones() {
		return stones;
	}
}
{'fraction_non_alphanumeric': 0.114166168559474, 'fraction_numerical': 0.002390914524805738, 'mean_word_length': 3.6115702479338845, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5796401', 'n_tokens_mistral': 609, 'n_tokens_neox': 537, 'n_words': 174}