import { PointsTable } from '@core/racing/domain/value-objects/PointsTable';

export const makePointsTable = (points: number[]): PointsTable => {
  const pointsByPosition: Record<number, number> = {};
  points.forEach((value, index) => {
    pointsByPosition[index + 1] = value;
  });
  return new PointsTable(pointsByPosition);
};