package main
import (
"image/color"
"github.com/hajimehoshi/ebiten/v2"
)
// Game holds the top-level state for the Ebitengine run loop.
type Game struct {
ship Ship
}
// Update advances simulation; nothing to do in this milestone.
func (g *Game) Update() error {
return nil
}
// Draw renders the whole frame.
func (g *Game) Draw(screen *ebiten.Image) {
screen.Fill(color.RGBA{10, 15, 25, 255})
drawShip(screen, g.ship)
}
// Layout fixes the virtual resolution; the window scales to fit.
func (g *Game) Layout(_, _ int) (int, int) {
return VirtualW, VirtualH
}
func main() {
ebiten.SetWindowSize(1280, 720)
ebiten.SetWindowTitle("ftl-shape")
if err := ebiten.RunGame(&Game{ship: NewPlayerShip()}); err != nil {
panic(err)
}
}