package data

import (
	"code.ur.gs/lupine/ordoor/internal/util/asciiscan"
)

type CompassPoints struct {
	N  int
	NE int
	E  int
	SE int
	S  int
	SW int
	W  int
	NW int
}

type Range struct {
	Start int
	End   int
}

func consumeRange(scanner *asciiscan.Scanner) (Range, error) {
	var out Range

	err := scanner.ConsumeIntPtrs(&out.Start, &out.End)
	return out, err
}

func consumeCompassPoints(scanner *asciiscan.Scanner) (CompassPoints, error) {
	var out CompassPoints

	err := scanner.ConsumeIntPtrs(
		&out.N, &out.NE, &out.E, &out.SE, &out.S, &out.SW, &out.W, &out.NW,
	)

	return out, err
}
