|
@@ -7,7 +7,7 @@ import Loading from '../../util/Loading';
|
|
|
import JoinForm from './JoinForm';
|
|
|
import styles from './Lobby.module.css';
|
|
|
import StartGame from './StartGame';
|
|
|
-import { NORMAL, TIME_BANK } from '../../../domain/ruleSets';
|
|
|
+import { NORMAL, TIME_BANK, FROZEN } from '../../../domain/ruleSets';
|
|
|
|
|
|
const GameInfo = () => {
|
|
|
const { rounds, timer, onlyAmerica, ruleSet } = useGameConfig();
|
|
@@ -16,21 +16,24 @@ const GameInfo = () => {
|
|
|
return <Loading />
|
|
|
}
|
|
|
|
|
|
- let timeExplanation;
|
|
|
+ let explanation;
|
|
|
switch (ruleSet) {
|
|
|
+ case FROZEN:
|
|
|
+ explanation = `${rounds !== 1 ? ", each" : ""} with a ${ms(timer * 1000)} time limit, and you will not be able to adjust your view`;
|
|
|
+ break;
|
|
|
case TIME_BANK:
|
|
|
- timeExplanation = `with a ${ms(timer * 1000 * rounds)} time bank across all rounds`;
|
|
|
+ explanation = `with a ${ms(timer * 1000 * rounds)} time bank across all rounds`;
|
|
|
break;
|
|
|
case NORMAL: // fall-through
|
|
|
default:
|
|
|
- timeExplanation = `${rounds !== 1 ? ", each" : ""} with a ${ms(timer * 1000)} time limit`;
|
|
|
+ explanation = `${rounds !== 1 ? ", each" : ""} with a ${ms(timer * 1000)} time limit`;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
<span className={styles.label}>
|
|
|
- Game will run for {rounds} round{rounds !== 1 && 's'}{timeExplanation}
|
|
|
+ Game will run for {rounds} round{rounds !== 1 && 's'}{explanation}
|
|
|
</span>
|
|
|
{onlyAmerica && (
|
|
|
<span className={styles.label}>This game will only use locations within the United States of America</span>
|