Documentation
¶
Index ¶
- type AgentGenerator
- type AgentGeneratorCountPair
- type BaseServer
- func (bs *BaseServer[T]) AddAgent(agentToAdd T)
- func (bs *BaseServer[T]) GenerateAgentArrayFromMap() []T
- func (bs *BaseServer[T]) GetAgentMap() map[uuid.UUID]T
- func (bs *BaseServer[T]) GetIterations() int
- func (bs *BaseServer[T]) RemoveAgent(agentToAdd T)
- func (bs *BaseServer[T]) RunGameLoop()
- func (bs *BaseServer[T]) RunMessagingSession()
- func (bs *BaseServer[T]) Start()
- type IAgentOperations
- type IServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentGenerator ¶
type AgentGeneratorCountPair ¶
type AgentGeneratorCountPair[T baseagent.IAgent[T]] struct { // contains filtered or unexported fields }
func MakeAgentGeneratorCountPair ¶
func MakeAgentGeneratorCountPair[T baseagent.IAgent[T]](generatorFunction AgentGenerator[T], count int) AgentGeneratorCountPair[T]
type BaseServer ¶
func CreateServer ¶
func CreateServer[T baseagent.IAgent[T]](generatorArray []AgentGeneratorCountPair[T], iterations int) *BaseServer[T]
generate a server instance based on a mapping function and number of iterations
func (*BaseServer[T]) AddAgent ¶
func (bs *BaseServer[T]) AddAgent(agentToAdd T)
func (*BaseServer[T]) GenerateAgentArrayFromMap ¶
func (bs *BaseServer[T]) GenerateAgentArrayFromMap() []T
func (*BaseServer[T]) GetAgentMap ¶
func (bs *BaseServer[T]) GetAgentMap() map[uuid.UUID]T
func (*BaseServer[T]) GetIterations ¶
func (bs *BaseServer[T]) GetIterations() int
func (*BaseServer[T]) RemoveAgent ¶
func (bs *BaseServer[T]) RemoveAgent(agentToAdd T)
func (*BaseServer[T]) RunGameLoop ¶
func (bs *BaseServer[T]) RunGameLoop()
func (*BaseServer[T]) RunMessagingSession ¶
func (bs *BaseServer[T]) RunMessagingSession()
func (*BaseServer[T]) Start ¶
func (bs *BaseServer[T]) Start()
type IAgentOperations ¶
type IAgentOperations[T baseagent.IAgent[T]] interface { // gives access to the agents in the simulator GetAgentMap() map[uuid.UUID]T // adds an agent to the server AddAgent(agentToAdd T) // removes an agent from the server RemoveAgent(agentToRemove T) // translate the agent map into an array of agents GenerateAgentArrayFromMap() []T }
type IServer ¶
type IServer[T baseagent.IAgent[T]] interface { // gives operations for adding/removing agents from the simulator IAgentOperations[T] // gives access to number of iteration in simulator GetIterations() int // the set of functions defining how a 'game loop' should run RunGameLoop() // starts the agents' messaging session RunMessagingSession() // begins simulator Start() }
Click to show internal directories.
Click to hide internal directories.