Documentation
¶
Index ¶
Constants ¶
View Source
const ( PhaseLobby = "lobby" PhaseBrew = "brew" PhaseEvaluation = "evaluation" )
View Source
const ( White = 'w' Orange = 'o' Green = 'g' Red = 'r' Blue = 'u' Black = 'b' Yellow = 'y' Purple = 'p' )
View Source
const BustThreshold = 7
View Source
const MaxPlayers = 4
View Source
const NumRounds = 9
Variables ¶
View Source
var Board = []Space{ {Value: 0, VictoryPoints: 0}, {Value: 1, VictoryPoints: 0}, {Value: 2, VictoryPoints: 0}, {Value: 3, VictoryPoints: 0}, {Value: 4, VictoryPoints: 0}, {Value: 5, VictoryPoints: 0, Ruby: true}, {Value: 6, VictoryPoints: 1}, {Value: 7, VictoryPoints: 1}, {Value: 8, VictoryPoints: 1}, {Value: 9, VictoryPoints: 1, Ruby: true}, {Value: 10, VictoryPoints: 2}, {Value: 11, VictoryPoints: 2}, {Value: 12, VictoryPoints: 2}, {Value: 13, VictoryPoints: 2, Ruby: true}, {Value: 14, VictoryPoints: 3}, {Value: 15, VictoryPoints: 3}, {Value: 15, VictoryPoints: 3, Ruby: true}, {Value: 16, VictoryPoints: 3}, {Value: 16, VictoryPoints: 4}, {Value: 17, VictoryPoints: 4}, {Value: 17, VictoryPoints: 4, Ruby: true}, {Value: 18, VictoryPoints: 4}, {Value: 18, VictoryPoints: 5}, {Value: 19, VictoryPoints: 5}, {Value: 19, VictoryPoints: 5, Ruby: true}, {Value: 20, VictoryPoints: 5}, {Value: 20, VictoryPoints: 6}, {Value: 21, VictoryPoints: 6}, {Value: 21, VictoryPoints: 6, Ruby: true}, {Value: 22, VictoryPoints: 7}, {Value: 22, VictoryPoints: 7, Ruby: true}, {Value: 23, VictoryPoints: 7}, {Value: 23, VictoryPoints: 8}, {Value: 24, VictoryPoints: 8}, {Value: 24, VictoryPoints: 8, Ruby: true}, {Value: 25, VictoryPoints: 9}, {Value: 25, VictoryPoints: 9, Ruby: true}, {Value: 26, VictoryPoints: 9}, {Value: 27, VictoryPoints: 10}, {Value: 27, VictoryPoints: 10, Ruby: true}, {Value: 28, VictoryPoints: 11}, {Value: 28, VictoryPoints: 11, Ruby: true}, {Value: 29, VictoryPoints: 11}, {Value: 29, VictoryPoints: 12}, {Value: 30, VictoryPoints: 12}, {Value: 30, VictoryPoints: 12, Ruby: true}, {Value: 31, VictoryPoints: 12}, {Value: 31, VictoryPoints: 13}, {Value: 32, VictoryPoints: 13}, {Value: 32, VictoryPoints: 13, Ruby: true}, {Value: 33, VictoryPoints: 14}, {Value: 33, VictoryPoints: 14, Ruby: true}, {Value: 35, VictoryPoints: 15}, }
View Source
var Prices = []IngredientPrice{ {Ingredient: Ingredient{Type: Orange, Value: 1}, Price: 3}, {Ingredient: Ingredient{Type: Green, Value: 1}, Price: 4}, {Ingredient: Ingredient{Type: Green, Value: 2}, Price: 8}, {Ingredient: Ingredient{Type: Green, Value: 4}, Price: 14}, {Ingredient: Ingredient{Type: Red, Value: 1}, Price: 6}, {Ingredient: Ingredient{Type: Red, Value: 2}, Price: 10}, {Ingredient: Ingredient{Type: Red, Value: 4}, Price: 16}, {Ingredient: Ingredient{Type: Blue, Value: 1}, Price: 5}, {Ingredient: Ingredient{Type: Blue, Value: 2}, Price: 10}, {Ingredient: Ingredient{Type: Blue, Value: 4}, Price: 19}, {Ingredient: Ingredient{Type: Black, Value: 1}, Price: 10}, {Ingredient: Ingredient{Type: Yellow, Value: 1}, Price: 8}, {Ingredient: Ingredient{Type: Yellow, Value: 2}, Price: 12}, {Ingredient: Ingredient{Type: Yellow, Value: 4}, Price: 18}, {Ingredient: Ingredient{Type: Purple, Value: 1}, Price: 9}, }
View Source
var RatTailLocations = []int{2, 5, 8, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49}
RatTailLocations lists all victory point values that are preceded by a rat tail.
Functions ¶
This section is empty.
Types ¶
type Ingredient ¶
type IngredientPrice ¶
type IngredientPrice struct {
Ingredient
Price int
}
type IngredientSpace ¶
type IngredientSpace struct {
Ingredient
Space int
}
type Player ¶
type Player struct {
Name string
Potion Potion
Bag []Ingredient
Options []Ingredient
Buys [][]Ingredient
Score int
Rubies int
PotionLevel int
RatTails int
Flask bool
Done bool
}
func (*Player) PlaceIngredient ¶
func (p *Player) PlaceIngredient(ingredient Ingredient) error
func (*Player) TakeFromBag ¶
func (p *Player) TakeFromBag() Ingredient
type Potion ¶
type Potion struct {
StartingSpace int
Ingredients []IngredientSpace
}
func (*Potion) GetNextSpace ¶
GetNextSpace returns the index of the next space on the board after the last ingredient in the Potion.
Click to show internal directories.
Click to hide internal directories.