Documentation
¶
Index ¶
- Constants
- Variables
- func Ace(dices []int) int
- func BigStraight(dices []int) int
- func Choice(dices []int) int
- func Fives(dices []int) int
- func FourOfAKind(dices []int) int
- func Fours(dices []int) int
- func FullHouse(dices []int) int
- func LittleStraight(dices []int) int
- func Sixes(dices []int) int
- func Threes(dices []int) int
- func Twos(dices []int) int
- func Yacht(dices []int) int
- type Dice
- type DiceBox
- type DiceStatus
- type Dices
- type Game
- type Phase
- type PhaseType
- type Player
- type Players
- type Score
- func (s *Score) Fill(yaku string, point int) error
- func (s *Score) FillAce(point int) error
- func (s *Score) FillBigStraight(point int) error
- func (s *Score) FillChoice(point int) error
- func (s *Score) FillFives(point int) error
- func (s *Score) FillFourOfAKind(point int) error
- func (s *Score) FillFours(point int) error
- func (s *Score) FillFullHouse(point int) error
- func (s *Score) FillLittleStraight(point int) error
- func (s *Score) FillSixes(point int) error
- func (s *Score) FillThrees(point int) error
- func (s *Score) FillTwos(point int) error
- func (s *Score) FillYacht(point int) error
- func (s *Score) FillableMap() map[string]bool
- func (s *Score) IsFilledAll() bool
- func (s *Score) Point() int
- type Turn
- type Yaku
Constants ¶
View Source
const (
NumberOfYakuType = 12
)
Variables ¶
View Source
var (
DiceEmojiMap = map[int]string{
1: "⚀",
2: "⚁",
3: "⚂",
4: "⚃",
5: "⚄",
6: "⚅",
}
)
Functions ¶
Types ¶
type Dice ¶
type Dice struct {
Number int
Emoji string
Status DiceStatus
}
type DiceBox ¶
func NewDiceBox ¶
type DiceStatus ¶
type DiceStatus int
const ( DiceStatusReady DiceStatus = iota DiceStatusRolled DiceStatusPicked )
type Game ¶
func (*Game) RemainTurn ¶
type Phase ¶
func (*Phase) CanMovePickPhase ¶
func (*Phase) CanMoveRollPhase ¶
func (*Phase) CanMoveScoringPhase ¶
func (*Phase) MoveEndPhase ¶
func (p *Phase) MoveEndPhase()
func (*Phase) MovePickPhase ¶
func (p *Phase) MovePickPhase()
func (*Phase) MoveRollPhase ¶
func (p *Phase) MoveRollPhase()
func (*Phase) MoveScoringPhase ¶
func (p *Phase) MoveScoringPhase()
type Players ¶
func NewPlayers ¶
func NewPlayers() *Players
type Score ¶
type Score struct {
Ace int
Twos int
Threes int
Fours int
Fives int
Sixes int
Choice int
FourOfAKind int
FullHouse int
LittleStraight int
BigStraight int
Yacht int
IsFilledAce bool
IsFilledTwos bool
IsFilledThrees bool
IsFilledFours bool
IsFilledFives bool
IsFilledSixes bool
IsFilledChoice bool
IsFilledFourOfAKind bool
IsFilledFullHouse bool
IsFilledLittleStraight bool
IsFilledBigStraight bool
IsFilledYacht bool
}
func (*Score) FillBigStraight ¶
func (*Score) FillChoice ¶
func (*Score) FillFourOfAKind ¶
func (*Score) FillFullHouse ¶
func (*Score) FillLittleStraight ¶
func (*Score) FillThrees ¶
func (*Score) FillableMap ¶
func (*Score) IsFilledAll ¶
Click to show internal directories.
Click to hide internal directories.