Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlayerDatabase ¶
type PlayerManager ¶
type PlayerManager interface {
GetPlayerJoinRejection(playerId model.PlayerId) *string
PlayerJoin(playerId model.PlayerId) (model.SessionId, error)
PlayerLeave(playerId model.PlayerId) error
IsActivePlayer(playerId model.PlayerId) bool
PlayerVote(playerId model.PlayerId, key string, strength *int) error
GetPlayerTakeoverRejection(playerId model.PlayerId, tier model.TakeoverTier) string
StartTakeover(playerId model.PlayerId, tier model.TakeoverTier) error
CurrentTakeover() *model.Takeover
CanReport(reporterId model.PlayerId, reportedId model.PlayerId) bool
Report(reporterId model.PlayerId, reportedId model.PlayerId, reason string) error
}
type Simulation ¶
type Simulation struct {
// contains filtered or unexported fields
}
func New ¶
func New(environment env.Env, playerManager PlayerManager, db PlayerDatabase, stateEvents StateUpdateEventProducer) Simulation
func (*Simulation) AddBots ¶
func (s *Simulation) AddBots(n int) error
func (*Simulation) KillAllBots ¶
func (s *Simulation) KillAllBots() error
func (*Simulation) KillBot ¶
func (s *Simulation) KillBot(botName string) error
func (*Simulation) Start ¶
func (s *Simulation) Start()
func (*Simulation) Stop ¶
func (s *Simulation) Stop()
type StateUpdateEventProducer ¶
type StateUpdateEventProducer interface {
SubscribeToEvents(listener func(event stateevents.UpdateEvent)) stateevents.EventConsumerId
Unsubscribe(id stateevents.EventConsumerId)
}
Click to show internal directories.
Click to hide internal directories.