package game

import "strings"

type RouteType string

const (
	RouteMaterial RouteType = "MAT" // Сырьё
	RouteCapital  RouteType = "CAP" // Промышленность
	RouteColonist RouteType = "COL" // Колонисты
	RouteEmpty    RouteType = "EMP" // Пустые корабли
)

var (
	RouteTypeSet map[string]RouteType = map[string]RouteType{
		strings.ToLower(RouteMaterial.String()): RouteMaterial,
		strings.ToLower(RouteCapital.String()):  RouteCapital,
		strings.ToLower(RouteColonist.String()): RouteColonist,
		strings.ToLower(RouteEmpty.String()):    RouteEmpty,
	}
	RouteToCargo map[RouteType]CargoType = map[RouteType]CargoType{
		RouteColonist: CargoColonist,
		RouteCapital:  CargoCapital,
		RouteMaterial: CargoMaterial,
	}
)

func (rt RouteType) Ref() *RouteType {
	return &rt
}

func (rt RouteType) String() string {
	return string(rt)
}
