package game_test

import (
	"testing"

	"galaxy/game/internal/model/game"

	"github.com/stretchr/testify/assert"
)

var (
	ts = game.TechSet{
		game.TechDrive:   1.1,
		game.TechWeapons: 1.2,
		game.TechShields: 1.3,
		game.TechCargo:   1.4,
	}
	r = game.Race{
		Tech: ts,
	}
)

func TestTechLevel(t *testing.T) {
	assert.Equal(t, 1.1, r.TechLevel(game.TechDrive))
	assert.Equal(t, 1.2, r.TechLevel(game.TechWeapons))
	assert.Equal(t, 1.3, r.TechLevel(game.TechShields))
	assert.Equal(t, 1.4, r.TechLevel(game.TechCargo))
}

func TestFlightDistance(t *testing.T) {
	assert.Equal(t, 44., r.FlightDistance())
}

func TestVisibilityDistance(t *testing.T) {
	assert.Equal(t, 33., r.VisibilityDistance())
}
