Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var (
ErrUnknownNPCType = errors.New(`unknown NPC type`)
)
Functions ¶
This section is empty.
Types ¶
type ActionHandler ¶
type ActionHandler interface {
Handle(action model.PlayerAction) error
}
type Means ¶
type Means struct { Mode Mode `protobuf:"-" json:"-" bson:"mode"` Info interface{} `protobuf:"-" json:"-" bson:"info"` }
func (*Means) AddSerializedInfo ¶
func (*Means) GetSerializedInfo ¶
type Mock ¶
func (*Mock) NotifyBlocking ¶
type NPCPlayer ¶
type NPCPlayer struct {
// contains filtered or unexported fields
}
func (*NPCPlayer) NotifyBlocking ¶
func (*NPCPlayer) NotifyMessage ¶
The NPC doesn't care about messages or score updates
type Player ¶
type Player interface { ID() model.PlayerID NotifyBlocking(model.Blocker, model.Game, string) error NotifyMessage(model.Game, string) error NotifyScoreUpdate(g model.Game, msgs ...string) error }
func FromPlayerMeans ¶
func FromPlayerMeans(pm PlayerMeans) (Player, error)
func NewNPCPlayer ¶
func NewNPCPlayer(pID model.PlayerID, ah ActionHandler) (Player, error)
NewNPCPlayer creates a new NPC with specified type
Click to show internal directories.
Click to hide internal directories.