Files
gridpilot.gg/core/racing/domain/entities/CarClass.ts
2025-12-17 00:33:13 +01:00

17 lines
413 B
TypeScript

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;
}
}