FatCat_Tanks_Challenge/Tank.ts

13 lines
230 B
TypeScript
Raw Normal View History

2023-12-05 18:52:03 +00:00
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);