package src import ( "fmt" . "git.danitheskunk.com/squishy/blooblib" "git.danitheskunk.com/squishy/blooblib/color" ) type Game struct { gobanRenderer *GobanRenderer boardState *BoardState } func (g *Game) Init(bloob *Bloob, settings *Settings) { settings.Title = "Goo v0.0" settings.TargetFps = 240 g.boardState = NewBoardState() g.gobanRenderer = NewGobanRenderer(g.boardState) g.boardState.Set(Vec2i{X: 3, Y: 3}, Black) } func (g *Game) Render(bloob *Bloob, screen *Image) { mouseTilePos := DivScalar(bloob.MousePos, 16) g.gobanRenderer.Render(screen) if mouseTilePos.X >= 10 && mouseTilePos.Y >= 1 && mouseTilePos.X < 29 && mouseTilePos.Y < 20 { tilePos := Sub(mouseTilePos, Vec2i{X: 10, Y: 1}) g.boardState.DrawHover(screen, tilePos, Black) } screen.DrawText(fmt.Sprintf("%3d x %3d", bloob.MousePos.X, bloob.MousePos.Y), DefaultFont, Vec2i{10, 10}, color.White) } func (g *Game) Update(bloob *Bloob) { }