phaseManagement Skeleton
parent
a95240a1b0
commit
0165d9212b
|
@ -1,4 +1,4 @@
|
|||
import GameState from './gameState'
|
||||
import GameState, { PHASE_ENUM } from './gameState'
|
||||
|
||||
class GameFlow {
|
||||
gameState: GameState
|
||||
|
@ -7,19 +7,22 @@ class GameFlow {
|
|||
this.gameState = gameState;
|
||||
}
|
||||
|
||||
executeCurrentPhase() {
|
||||
switch (this.gameState.currentPhase) {
|
||||
case 'initialChoice':
|
||||
// Handle initial choice
|
||||
async executeCurrentPhase(userInput?: any) {
|
||||
switch (this.gameState.phase) {
|
||||
case PHASE_ENUM.SETUP:
|
||||
// Handle the setup phase, e.g., initial purchases
|
||||
break;
|
||||
case 'fort':
|
||||
// Handle fort logic
|
||||
case PHASE_ENUM.RIDERS_ATTACK:
|
||||
break;
|
||||
// Other cases for each phase
|
||||
// Additional cases for other phases...
|
||||
case PHASE_ENUM.TRAVEL:
|
||||
// Handle travel logic
|
||||
break;
|
||||
case PHASE_ENUM.FORT:
|
||||
// Handle fort or hunt choices
|
||||
break;
|
||||
// Include other phases as necessary
|
||||
}
|
||||
|
||||
// After phase logic, advance to next phase
|
||||
this.gameState.advancePhase();
|
||||
}
|
||||
|
||||
// Other methods as needed
|
||||
|
|
Loading…
Reference in New Issue