Added events and mountains to the game flow class.

master
j 2024-05-10 23:26:03 -04:00
parent 9f136525a0
commit 4d0f4a7589
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,8 @@ import { HuntPhase } from '../phases/hunt';
import { HandleSetup as SetupPhase } from '../phases/setup'; import { HandleSetup as SetupPhase } from '../phases/setup';
import { travelPhase as TravelPhase } from '../phases/travel'; import { travelPhase as TravelPhase } from '../phases/travel';
import { ActionPhase } from '../phases/action'; import { ActionPhase } from '../phases/action';
import { EventPhase } from './gameEvents';
import { MountainPhase } from '../phases/mountain';
class GameFlow { class GameFlow {
@ -41,9 +43,11 @@ class GameFlow {
break; break;
case PHASE_ENUM.EVENT: case PHASE_ENUM.EVENT:
// Handle random events that can occur // Handle random events that can occur
await EventPhase.handleRandomEvent(gameState);
break; break;
case PHASE_ENUM.MOUNTAIN: case PHASE_ENUM.MOUNTAIN:
// Handle mountain traversal challenges // Handle mountain traversal challenges
await MountainPhase.handleMountain(gameState);
break; break;
case PHASE_ENUM.DEATH: case PHASE_ENUM.DEATH:
// Check if conditions leading to the player's death have been met // Check if conditions leading to the player's death have been met