<commit_before>package dorothea

type Pin struct {
	player *Player
	field  int
}

const OUT_AREA = -1

func NewPins(p *Player) [4]*Pin {
	var pins [4]*Pin
	for i := 0; i < 4; i++ {
		pins[i] = &Pin{
			player: p,
			field:  OUT_AREA}
	}
	return pins
}<commit_msg>new Position type for Pins<commit_after>package dorothea

type Position int

const (
	Out     Position = iota // Pin in OutArea
	OnField                 // Pin on Field
	InHome                  // Pin in HomeArea
)

type Pin struct {
	player    *Player
	position  Position
	iField    int // index in game.fields when position == OnField
	iHomeArea int // index in player.HomeArea when position == InHome
}

const NOT_IN_INDEX = -1

func NewPins(p *Player) [4]*Pin {
	var pins [4]*Pin
	for i := 0; i < 4; i++ {
		pins[i] = &Pin{
			player:    p,
			position:  Out,
			iField:    NOT_IN_INDEX,
			iHomeArea: NOT_IN_INDEX}
	}
	return pins
}
{'fraction_non_alphanumeric': 0.10777777777777778, 'fraction_numerical': 0.011111111111111112, 'mean_word_length': 2.589641434262948, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4116219', 'n_tokens_mistral': 361, 'n_tokens_neox': 334, 'n_words': 108}