FatCat_Tanks_Challenge/Tank.ts
2023-12-05 19:52:03 +01:00

13 lines
230 B
TypeScript

export interface ITank {
name: string;
health: number;
attackDelay: number;
}
type BuildTank = (name: string) => ITank;
export const buildTank: BuildTank = (name) => ({
name,
health: 100,
attackDelay: 0,
} as ITank);