refactoring

This commit is contained in:
Settel 2021-08-09 10:23:58 +02:00
parent 1e478ffb3b
commit 0585c60063
3 changed files with 22 additions and 10 deletions

View File

@ -6,12 +6,6 @@ import (
"sirlab.de/go/knyt/user"
)
type Application struct {
config applicationConfig.ApplicationConfig
users map[string]*user.User
games map[string]*game.Game
}
func NewApplication(config applicationConfig.ApplicationConfig) (*Application, error) {
app := Application{
config: config,
@ -28,7 +22,3 @@ func NewApplication(config applicationConfig.ApplicationConfig) (*Application, e
return &app, nil
}
func (app *Application) GetConfig() applicationConfig.ApplicationConfig {
return app.config
}

View File

@ -0,0 +1,9 @@
package application
import (
"sirlab.de/go/knyt/applicationConfig"
)
func (app *Application) GetConfig() applicationConfig.ApplicationConfig {
return app.config
}

View File

@ -0,0 +1,13 @@
package application
import (
"sirlab.de/go/knyt/applicationConfig"
"sirlab.de/go/knyt/game"
"sirlab.de/go/knyt/user"
)
type Application struct {
config applicationConfig.ApplicationConfig
users map[string]*user.User
games map[string]*game.Game
}