Compare commits

...

2 Commits

Author SHA1 Message Date
3f2af28a9a we'll see how this goes with the larger model
Some checks failed
build rgb-board / build (push) Failing after 5m16s
2025-06-10 14:22:21 +00:00
9e9084c9e7 to be an agent 2025-06-10 14:22:21 +00:00
2 changed files with 35 additions and 12 deletions

View File

@@ -10,6 +10,7 @@ models:
- chat
- edit
- apply
- agent
- name: qwen3
provider: ollama
model: qwen3:14b
@@ -18,6 +19,7 @@ models:
- chat
- edit
- apply
- agent
context:

View File

@@ -6,6 +6,8 @@ import (
"log"
"os"
"math"
"github.com/disintegration/imaging"
)
@@ -14,6 +16,9 @@ type Mario struct {
dir image.Point
images map[string]image.Image
updown string
a float64
b float64
angle float64
}
func loadMario(file string) image.Image {
@@ -53,20 +58,36 @@ func (a *Animation) animateMario() {
// what mario does every frame
func (a *Animation) updateMarioPosition() {
a.mario.position.X += 1 * a.mario.dir.X
a.mario.position.Y += 1 * a.mario.dir.Y
// Ellipse parameters (centered on canvas)
centerX := a.ctx.Width() / 2
centerY := a.ctx.Height() / 2
if a.mario.position.Y+a.height > a.ctx.Height() {
a.mario.dir.Y = -1
a.mario.updown = "marioUp"
} else if a.mario.position.Y-a.height < 0 {
a.mario.updown = "marioDown"
a.mario.dir.Y = 1
// Calculate new position using parametric ellipse equations
t := a.mario.angle
marioX := centerX + a.mario.a*math.Cos(t)
marioY := centerY + a.mario.b*math.Sin(t)
// Update angle to move along the ellipse
a.mario.angle += 0.1 // Adjust speed as needed
if a.mario.angle >= 2*math.Pi {
a.mario.angle -= 2 * math.Pi
}
if a.mario.position.X+a.width > a.ctx.Width() {
a.mario.dir.X = -1
} else if a.mario.position.X-a.width < 0 {
a.mario.dir.X = 1
// Determine horizontal direction (left/right) for image flipping
if math.Sin(t) > 0 {
a.mario.dir.X = -1 // Moving left
} else {
a.mario.dir.X = 1 // Moving right
}
// Determine vertical direction (up/down) for image selection
if math.Cos(t) > 0 {
a.mario.updown = "marioUp" // Moving downward
} else {
a.mario.updown = "marioDown" // Moving upward
}
// Update Mario's position
a.mario.position.X = marioX
a.mario.position.Y = marioY
}