package client

import (
	"image/color"

	"galaxy/client/world"
)

func mockWorld() *world.World {
	w := world.NewWorld(300, 300)
	mockWorldInit(w)
	return w
}

func mockWorldInit(w *world.World) {
	lineStyle := w.AddStyleLine(world.StyleOverride{
		StrokeColor:   color.RGBA{R: 0, G: 255, B: 0, A: 255},
		StrokeWidthPx: new(3.0),
		StrokeDashes:  new([]float64{10.}),
	})

	if _, err := w.AddCircle(150, 150, 50); err != nil {
		panic(err)
	}

	if _, err := w.AddCircle(150, 299, 30); err != nil {
		panic(err)
	}
	if _, err := w.AddCircle(299, 150, 30); err != nil {
		panic(err)
	}

	if _, err := w.AddLine(100, 20, 200, 30, world.LineWithStyleID(lineStyle), world.LineWithPriority(500)); err != nil {
		panic(err)
	}

	if _, err := w.AddLine(50, 50, 250, 100); err != nil {
		panic(err)
	}

	if _, err := w.AddPoint(10, 10); err != nil {
		panic(err)
	}

	if _, err := w.AddPoint(25, 255); err != nil {
		panic(err)
	}
}
