GameEngine/pkg/engine/game.go
Snoweuph e19048569f
Some checks failed
Quality Check / Static Analysis (push) Failing after 12s
Quality Check / Linting (push) Failing after 15s
Init
2024-09-16 19:47:12 +02:00

29 lines
473 B
Go

package engine
import (
engine "dev.euph.git/snoweuph/game-engine/pkg/engine/ports"
)
type Game struct {
packages []engine.Package
}
func NewGame(packages ...engine.Package) (*Game, error) {
for _, p := range packages{
err := p.Load()
if err != nil{
return nil, err
}
}
return &Game{
packages: packages,
}, nil
}
func (g *Game) Terminate(){
for _, p := range g.packages{
p.Terminate()
}
}