diff options
author | Joris | 2021-05-20 09:43:02 +0200 |
---|---|---|
committer | Joris | 2021-05-20 09:43:02 +0200 |
commit | f9e7e819a0a673befb11b24404efeb9d6644bceb (patch) | |
tree | 07fdcc252964382568236647e74709980dc479d4 /src/config.ts | |
parent | cde24cbf3fbc418af3c98d82e47dcd5df71e5b26 (diff) |
Provide named exercices
Diffstat (limited to 'src/config.ts')
-rw-r--r-- | src/config.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config.ts b/src/config.ts index d1d369e..5cd23e6 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,7 +1,7 @@ export interface Config { warmup: number; prepare : number; - tabatas : number; + tabatas : string[]; cycles : number; work : number; rest : number; @@ -9,8 +9,8 @@ export interface Config { export function init(): Config { return { - warmup: 120, - tabatas: 4, + warmup: 180, + tabatas: [], prepare: 10, cycles: 8, work: 20, @@ -19,5 +19,5 @@ export function init(): Config { } export function getDuration(c: Config): number { - return c.warmup + c.tabatas * (c.prepare + (c.cycles * (c.work + c.rest))) + return c.warmup + c.tabatas.length * (c.prepare + (c.cycles * (c.work + c.rest))) } |