Skip to content

Instantly share code, notes, and snippets.

@tafo
Created December 13, 2023 18:31
Show Gist options
  • Save tafo/859e7f79b54bf306cbf46aef06f09d13 to your computer and use it in GitHub Desktop.
Save tafo/859e7f79b54bf306cbf46aef06f09d13 to your computer and use it in GitHub Desktop.
Why do I need to write parameter names
func main() {
ebiten.SetWindowSize(1280, 640)
ebiten.SetWindowTitle("Wordy")
if err := ebiten.RunGame(&wordy.Game{}); err != nil {
panic(err)
}
}
func (g *Game) Layout(outsideWidth int, outSideHeight int) (screenWidth int, screenHeight int) {
return ScreenWidth, ScreenHeight
}
// I have to keep outsideWidth and outSideHeight parameters
// Otherwise, GoLand shows an error
// Why
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment