diff --git a/constructor/engine.go b/konstructor/engine.go similarity index 66% rename from constructor/engine.go rename to konstructor/engine.go index efc80ae..a13e981 100755 --- a/constructor/engine.go +++ b/konstructor/engine.go @@ -1,4 +1,4 @@ -package constructor +package konstructor import ( "image/color" @@ -7,20 +7,20 @@ import ( ) type GameEngine struct { - Constructor Constructor + Konstructor Konstructor } func (g *GameEngine) Update(screen *ebiten.Image) error { - g.Constructor.Controller.Watch() + g.Konstructor.Controller.Watch() return nil } func (g *GameEngine) Draw(screen *ebiten.Image) { - if g.Constructor.Controller.UpPressed() { + if g.Konstructor.Controller.UpPressed() { screen.Fill(color.White) } } func (g *GameEngine) Layout(outsideWidth, outsideHeight int) (int, int) { - return g.Constructor.GameSettings.ScreenSettings.Width, g.Constructor.GameSettings.ScreenSettings.Height + return g.Konstructor.GameSettings.ScreenSettings.Width, g.Konstructor.GameSettings.ScreenSettings.Height } diff --git a/constructor/keyboard.go b/konstructor/keyboard.go similarity index 93% rename from constructor/keyboard.go rename to konstructor/keyboard.go index 7ef7f76..2b18d8d 100755 --- a/constructor/keyboard.go +++ b/konstructor/keyboard.go @@ -1,4 +1,4 @@ -package constructor +package konstructor import ( "fmt" diff --git a/constructor/constructor.go b/konstructor/konstructor.go similarity index 71% rename from constructor/constructor.go rename to konstructor/konstructor.go index 0460b43..2e52c6f 100755 --- a/constructor/constructor.go +++ b/konstructor/konstructor.go @@ -1,4 +1,4 @@ -package constructor +package konstructor import ( "log" @@ -23,18 +23,18 @@ type GameSettings struct { ScreenSettings ScreenSettings } -type Constructor struct { +type Konstructor struct { Context ContextInterface Domain DomainInterface Controller Controller GameSettings GameSettings } -func (c Constructor) Init() { - ebiten.SetWindowSize(c.GameSettings.ScreenSettings.Width, c.GameSettings.ScreenSettings.Height) - ebiten.SetWindowTitle(c.GameSettings.Name) +func (k Konstructor) Init() { + ebiten.SetWindowSize(k.GameSettings.ScreenSettings.Width, k.GameSettings.ScreenSettings.Height) + ebiten.SetWindowTitle(k.GameSettings.Name) if err := ebiten.RunGame(&GameEngine{ - Constructor: c, + Konstructor: k, }); err != nil { log.Fatal(err) } diff --git a/constructor/utils.go b/konstructor/utils.go similarity index 89% rename from constructor/utils.go rename to konstructor/utils.go index 237bd1f..adbd5b3 100755 --- a/constructor/utils.go +++ b/konstructor/utils.go @@ -1,4 +1,4 @@ -package constructor +package konstructor import ( "bytes" diff --git a/main.go b/main.go index 49cc619..6a15ad5 100755 --- a/main.go +++ b/main.go @@ -1,8 +1,8 @@ package main import ( - "game/constructor" "game/domain" + "game/konstructor" "github.com/hajimehoshi/ebiten" ) @@ -18,10 +18,10 @@ func main() { }, }, } - constructor := constructor.Constructor{ + konstructor := konstructor.Konstructor{ Domain: domain, - Controller: constructor.Controller{ - KeyMap: constructor.KeyMap{ + Controller: konstructor.Controller{ + KeyMap: konstructor.KeyMap{ Up: ebiten.KeyUp, Down: ebiten.KeyDown, Right: ebiten.KeyRight, @@ -32,13 +32,13 @@ func main() { Action3: ebiten.KeyEscape, }, }, - GameSettings: constructor.GameSettings{ + GameSettings: konstructor.GameSettings{ Name: "Game", - ScreenSettings: constructor.ScreenSettings{ + ScreenSettings: konstructor.ScreenSettings{ Width: 640, Height: 480, }, }, } - constructor.Init() + konstructor.Init() }