27 lines
299 B
Go
27 lines
299 B
Go
package roleplay
|
|
|
|
import (
|
|
)
|
|
|
|
type Entity interface {
|
|
Tick()
|
|
}
|
|
|
|
type Instance struct {
|
|
|
|
}
|
|
|
|
type Server struct {
|
|
entities map[int]Entity
|
|
instances map[string]Instance
|
|
}
|
|
|
|
func(server Server) Tick() {
|
|
for _, entity := range(server.entities) {
|
|
entity.Tick()
|
|
}
|
|
}
|
|
|
|
func(server Server) Listen() {
|
|
}
|