card_sharp: github.com/gophergala/card_sharp/lobby Index | Files

package lobby

import "github.com/gophergala/card_sharp/lobby"

Index

Package Files

lobby.go

type Event Uses

type Event struct {
    Type string
    HTML string
    Data interface{}
}

type Lobby Uses

type Lobby struct {
    ID         string
    Name       string
    State      string
    Presenter  chan []byte
    Players    []*Player
    PlayerChan map[string]chan []byte
    Creation   time.Time
    Czar       *Player
    Game       *store.Deck
    Instance   *store.Game
}

func Create Uses

func Create(d store.Deck) *Lobby

func Find Uses

func Find(id string) *Lobby

func (*Lobby) Add Uses

func (g *Lobby) Add(p *Player)

func (Lobby) FindPlayer Uses

func (l Lobby) FindPlayer(pid string) *Player

func (*Lobby) GameReady Uses

func (g *Lobby) GameReady()

func (*Lobby) GameStart Uses

func (g *Lobby) GameStart()

func (*Lobby) NextRound Uses

func (l *Lobby) NextRound()

func (*Lobby) NotifyFor Uses

func (g *Lobby) NotifyFor(p *Player)

func (*Lobby) PickCard Uses

func (l *Lobby) PickCard(pid string)

func (*Lobby) PlayCard Uses

func (l *Lobby) PlayCard(p *Player, card string)

func (*Lobby) Sync Uses

func (l *Lobby) Sync(p *Player)

type Player Uses

type Player struct {
    ID          string
    Name        string
    Czar        bool
    Status      string
    Cards       []*store.Card
    RoundPoints int
}

func CreatePlayer Uses

func CreatePlayer(name string) *Player

func FindPlayer Uses

func FindPlayer(id string) *Player

func (Player) Actionable Uses

func (p Player) Actionable() bool

func (Player) ButtonDisabled Uses

func (p Player) ButtonDisabled() string

func (Player) ButtonMessage Uses

func (p Player) ButtonMessage() string

func (Player) Judge Uses

func (p Player) Judge() bool

func (Player) Ready Uses

func (p Player) Ready() bool

func (Player) ShowCards Uses

func (p Player) ShowCards() bool

func (Player) StatusMessage Uses

func (p Player) StatusMessage() string

func (Player) String Uses

func (p Player) String() string

Package lobby imports 9 packages (graph). Updated 2017-11-22. Refresh now. Tools for package owners.