rename presenter to constructor (memoriem of Last Ninja)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package presenter
|
package constructor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/domain"
|
"game/domain"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package presenter
|
package constructor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package presenter
|
package constructor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"game/domain"
|
"game/domain"
|
||||||
@@ -11,13 +11,13 @@ type DomainInterface interface {
|
|||||||
Init()
|
Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
type Presenter struct {
|
type Constructor struct {
|
||||||
Context domain.Context
|
Context domain.Context
|
||||||
Domain DomainInterface
|
Domain DomainInterface
|
||||||
Keyboard Keyboard
|
Keyboard Keyboard
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p Presenter) Init() {
|
func (p Constructor) Init() {
|
||||||
ebiten.SetWindowSize(screenWidth*2, screenHeight*2)
|
ebiten.SetWindowSize(screenWidth*2, screenHeight*2)
|
||||||
ebiten.SetWindowTitle("Game")
|
ebiten.SetWindowTitle("Game")
|
||||||
if err := ebiten.RunGame(&GameEngine{
|
if err := ebiten.RunGame(&GameEngine{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package presenter
|
package constructor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
10
main.go
10
main.go
@@ -1,8 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"game/constructor"
|
||||||
"game/domain"
|
"game/domain"
|
||||||
"game/presenter"
|
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
)
|
)
|
||||||
@@ -18,10 +18,10 @@ func main() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
presenter := presenter.Presenter{
|
constructor := constructor.Constructor{
|
||||||
Domain: domain,
|
Domain: domain,
|
||||||
Keyboard: presenter.Keyboard{
|
Keyboard: constructor.Keyboard{
|
||||||
KeyMap: presenter.KeyMap{
|
KeyMap: constructor.KeyMap{
|
||||||
Up: ebiten.KeyUp,
|
Up: ebiten.KeyUp,
|
||||||
Down: ebiten.KeyDown,
|
Down: ebiten.KeyDown,
|
||||||
Right: ebiten.KeyRight,
|
Right: ebiten.KeyRight,
|
||||||
@@ -33,5 +33,5 @@ func main() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
presenter.Init()
|
constructor.Init()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user