Documentation ¶
Index ¶
- type Color
- type Deck
- type Game
- type HumanPlayer
- func (p *HumanPlayer) Draw(count int)
- func (p *HumanPlayer) ForeachCards(f func(card ICard) bool)
- func (p *HumanPlayer) GetNextPlayer(location int) IPlayer
- func (r *HumanPlayer) Init(game *Game, location int)
- func (r *HumanPlayer) IsWin() bool
- func (p *HumanPlayer) Location() int
- func (r *HumanPlayer) NotifyAddHandCard(cards ...ICard)
- func (r *HumanPlayer) NotifyDeckNum(count int)
- func (r *HumanPlayer) NotifyDiscardCard(location int, card ICard, args ...uint32)
- func (r *HumanPlayer) NotifyOtherAddHandCard(location int, count int)
- func (r *HumanPlayer) NotifyTurn(location int, dir bool)
- func (r *HumanPlayer) NotifyWin(location int)
- func (p *HumanPlayer) PlayCard(cardId uint32, args ...uint32)
- type ICard
- type IPlayer
- type RobotPlayer
- func (p *RobotPlayer) Draw(count int)
- func (p *RobotPlayer) ForeachCards(f func(card ICard) bool)
- func (p *RobotPlayer) GetNextPlayer(location int) IPlayer
- func (p *RobotPlayer) Init(game *Game, location int)
- func (p *RobotPlayer) IsWin() bool
- func (p *RobotPlayer) Location() int
- func (p *RobotPlayer) NotifyAddHandCard(_ ...ICard)
- func (p *RobotPlayer) NotifyDeckNum(int)
- func (p *RobotPlayer) NotifyDiscardCard(location int, card ICard, _ ...uint32)
- func (p *RobotPlayer) NotifyOtherAddHandCard(int, int)
- func (r *RobotPlayer) NotifyTurn(location int, _ bool)
- func (p *RobotPlayer) NotifyWin(int)
- func (p *RobotPlayer) PlayCard(cardId uint32, args ...uint32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Game ¶
type Game struct { Dir bool Players []IPlayer TotalPlayerCount int Deck *Deck LastCard ICard WantColor Color WhoseTurn int cellnet.EventQueue }
func (*Game) NextPlayer ¶
type HumanPlayer ¶
func (*HumanPlayer) ForeachCards ¶
func (*HumanPlayer) GetNextPlayer ¶
func (*HumanPlayer) Init ¶
func (r *HumanPlayer) Init(game *Game, location int)
func (*HumanPlayer) IsWin ¶
func (r *HumanPlayer) IsWin() bool
func (*HumanPlayer) NotifyAddHandCard ¶
func (r *HumanPlayer) NotifyAddHandCard(cards ...ICard)
func (*HumanPlayer) NotifyDeckNum ¶
func (r *HumanPlayer) NotifyDeckNum(count int)
func (*HumanPlayer) NotifyDiscardCard ¶
func (r *HumanPlayer) NotifyDiscardCard(location int, card ICard, args ...uint32)
func (*HumanPlayer) NotifyOtherAddHandCard ¶
func (r *HumanPlayer) NotifyOtherAddHandCard(location int, count int)
func (*HumanPlayer) NotifyTurn ¶
func (r *HumanPlayer) NotifyTurn(location int, dir bool)
func (*HumanPlayer) NotifyWin ¶
func (r *HumanPlayer) NotifyWin(location int)
type IPlayer ¶
type IPlayer interface { Init(game *Game, location int) Location() int NotifyAddHandCard(card ...ICard) NotifyOtherAddHandCard(location int, count int) NotifyDeckNum(count int) NotifyDiscardCard(location int, card ICard, args ...uint32) NotifyTurn(location int, dir bool) PlayCard(cardId uint32, args ...uint32) IsWin() bool GetNextPlayer(location int) IPlayer NotifyWin(location int) Draw(count int) ForeachCards(func(card ICard) bool) }
type RobotPlayer ¶
type RobotPlayer struct {
// contains filtered or unexported fields
}
func (*RobotPlayer) ForeachCards ¶
func (*RobotPlayer) GetNextPlayer ¶
func (*RobotPlayer) NotifyAddHandCard ¶
func (p *RobotPlayer) NotifyAddHandCard(_ ...ICard)
func (*RobotPlayer) NotifyDeckNum ¶
func (p *RobotPlayer) NotifyDeckNum(int)
func (*RobotPlayer) NotifyDiscardCard ¶
func (*RobotPlayer) NotifyOtherAddHandCard ¶
func (*RobotPlayer) NotifyTurn ¶
func (r *RobotPlayer) NotifyTurn(location int, _ bool)
Click to show internal directories.
Click to hide internal directories.