export type CarClassType = 'formula' | 'gt' | 'prototype' | 'touring' | 'sports' | 'oval' | 'dirt';

export class CarClass {
  private constructor(private readonly value: CarClassType) {}

  static create(value: CarClassType): CarClass {
    return new CarClass(value);
  }

  toString(): CarClassType {
    return this.value;
  }

  equals(other: CarClass): boolean {
    return this.value === other.value;
  }
}