diff --git a/game/src/app.tsx b/game/src/app.tsx index dd1af37cd..c9b0cea11 100644 --- a/game/src/app.tsx +++ b/game/src/app.tsx @@ -64,7 +64,7 @@ const App = () => { if (ls_res) { return ls_res as Difficulty; } // Otherwise, just leave it unchecked - return Difficulty.UNLIMITED_TIME; + return Difficulty.UNLIMITED; } ); diff --git a/game/src/difficulty.ts b/game/src/difficulty.ts index 1c4c25aa1..334ea16ac 100644 --- a/game/src/difficulty.ts +++ b/game/src/difficulty.ts @@ -2,15 +2,15 @@ import './language'; import { Language } from './language'; export enum Difficulty { - UNLIMITED_TIME = "UNLIMITED", - TIMED = "TIMED", - TIME_SPRINT = "TIME SPRINT" + UNLIMITED = "UNLIMITED", + TIMED = "TIMED", + BLITZ = "BLITZ" } export const Difficulties : Difficulty[] = [ - Difficulty.UNLIMITED_TIME, + Difficulty.UNLIMITED, Difficulty.TIMED, - Difficulty.TIME_SPRINT, + Difficulty.BLITZ, ]; export interface DifficultyLogic { @@ -23,7 +23,7 @@ export const GetDifficultyLogic = (d: Difficulty, numberOfChars: number) : Diffi const totalTime = Math.max(minimumTime, numberOfChars * 1000) switch (d) { - case Difficulty.UNLIMITED_TIME: + case Difficulty.UNLIMITED: return { initialTime: Infinity, addTime: (word_length: number) => 0 @@ -33,7 +33,7 @@ export const GetDifficultyLogic = (d: Difficulty, numberOfChars: number) : Diffi initialTime: totalTime, addTime: (word_length: number) => 0 }; - case Difficulty.TIME_SPRINT: + case Difficulty.BLITZ: const initialTime = Math.max(30 * 1000 /* 30s */, totalTime / 7); const timePerChar = (totalTime-initialTime) / numberOfChars; @@ -51,30 +51,30 @@ export const DifficultyName = (d: Difficulty, l: Language | undefined) : string switch(l) { case Language.DK: switch (d) { - case Difficulty.UNLIMITED_TIME: return "Uendelig Tid"; - case Difficulty.TIMED: return "Tid"; - case Difficulty.TIME_SPRINT: return "Tidsspurt"; + case Difficulty.UNLIMITED: return "Ubegrænset"; + case Difficulty.TIMED: return "Tid"; + case Difficulty.BLITZ: return "Lyn"; } break; case Language.DE: switch (d) { - case Difficulty.UNLIMITED_TIME: return "Unbeschränkte Zeit"; - case Difficulty.TIMED: return "Zeit"; - case Difficulty.TIME_SPRINT: return "Zeit-Sprint"; + case Difficulty.UNLIMITED: return "Unbegrenzt"; + case Difficulty.TIMED: return "Zeit"; + case Difficulty.BLITZ: return "Blitz"; } break; case Language.EN: switch (d) { - case Difficulty.UNLIMITED_TIME: return "Unlimited Time"; - case Difficulty.TIMED: return "Timed"; - case Difficulty.TIME_SPRINT: return "Time Sprint"; + case Difficulty.UNLIMITED: return "Unlimited"; + case Difficulty.TIMED: return "Timed"; + case Difficulty.BLITZ: return "Blitz"; } break; case Language.ES: switch (d) { - case Difficulty.UNLIMITED_TIME: return "Ilimitado"; - case Difficulty.TIMED: return "Contrarreloj"; - case Difficulty.TIME_SPRINT: return "Relámpago"; + case Difficulty.UNLIMITED: return "Ilimitado"; + case Difficulty.TIMED: return "Contrarreloj"; + case Difficulty.BLITZ: return "Relámpago"; } break; default: