remove controller layer
This commit is contained in:
@@ -13,12 +13,21 @@ type GameField struct {
|
||||
LevelSection LevelSection
|
||||
}
|
||||
|
||||
type Position struct {
|
||||
X int
|
||||
Y int
|
||||
}
|
||||
|
||||
type Context struct {
|
||||
Player Player
|
||||
User User
|
||||
GameField GameField
|
||||
Player Player
|
||||
User User
|
||||
CurrentGameField GameField
|
||||
CurrentPosition Position
|
||||
}
|
||||
|
||||
func CreateContext() Context {
|
||||
return Context{}
|
||||
return Context{
|
||||
Player: Player{},
|
||||
User: User{},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,15 @@
|
||||
package domain
|
||||
|
||||
type ControllerInterface interface {
|
||||
Init()
|
||||
}
|
||||
|
||||
type PresenterInterface interface {
|
||||
Init()
|
||||
}
|
||||
|
||||
type Domain struct {
|
||||
Context Context
|
||||
Controller ControllerInterface
|
||||
Presenter PresenterInterface
|
||||
Context Context
|
||||
Presenter PresenterInterface
|
||||
}
|
||||
|
||||
func (d Domain) Init() {
|
||||
d.Controller.Init()
|
||||
d.Presenter.Init()
|
||||
menu_manager := MenuManager{}
|
||||
menu_manager.Init()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package domain
|
||||
|
||||
type Screen struct {
|
||||
Controller ControllerInterface
|
||||
}
|
||||
|
||||
type ScreenManager struct {
|
||||
|
||||
Reference in New Issue
Block a user