FatCat_Tanks_Challenge/Tank.ts

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