adjustments for debugging. Cleanup and Addtl Statuses

master
j 2024-04-09 02:04:20 -04:00
parent 1053140576
commit 96ad73a3eb
2 changed files with 21 additions and 11 deletions

View File

@ -15,9 +15,9 @@ class GameFlow {
// Handle the setup phase, e.g., initial purchases
await this.handleSetupPhase(userInput);
break;
case PHASE_ENUM.RIDERS_ATTACK:
// Handle a riders attack phase
await this.handleRidersAttack(userInput);
case PHASE_ENUM.START_TURN:
break;
case PHASE_ENUM.ACTION_CHOICE:
break;
case PHASE_ENUM.TRAVEL:
// Handle travel logic
@ -31,9 +31,11 @@ class GameFlow {
// Handle hunting logic
await this.handleHunt();
break;
case PHASE_ENUM.ENCOUNTER:
// Handle encounters, which might include interactions with NPCs or obstacles
await this.handleEncounter();
case PHASE_ENUM.EATING:
break;
case PHASE_ENUM.RIDERS_ATTACK:
// Handle a riders attack phase
await this.handleRidersAttack(userInput);
break;
case PHASE_ENUM.EVENT:
// Handle random events that can occur
@ -76,9 +78,10 @@ class GameFlow {
supplies: this.gameState.amountSpentOnMiscellaneousSupplies.toString(),
};
const parsedMessage = `${MessageService.getRandomMessage(MessageFileName.Oregon_Template, placeholders)}`
console.log(JSON.stringify(placeholders, null, 4))
//const parsedMessage = `${MessageService.getRandomMessage(MessageFileName.Oregon_Template, placeholders)}`
await CommentPoster.postComment(`c_${this.gameState.comment.id}`, parsedMessage)
//await CommentPoster.postComment(`c_${this.gameState.comment.id}`, parsedMessage)
}
@ -250,8 +253,13 @@ class GameFlow {
}
}
break;
default:
case 6:
//Advance Phase
this.gameState.phase = PHASE_ENUM.START_TURN
this.executeCurrentPhase()
break;
default:
responseMessage = `@J something went wrong come and fix it.\n\n ${JSON.stringify(this.gameState, null, 4)}`
break;
}

View File

@ -92,12 +92,14 @@ export default GameState
// Enumeration for different phases of the game.
export enum PHASE_ENUM {
SETUP = 'SETUP',
START_TURN = 'START_TURN',
ACTION_CHOICE = 'ACTION_CHOICE',
TRAVEL = 'TRAVEL',
FORT = 'FORT',
HUNT = 'HUNT',
ENCOUNTER = 'ENCOUNTER',
EATING = 'EATING',
RIDERS_ATTACK = 'RIDERS_ATTACK',
EVENT = 'EVENT',
MOUNTAIN = 'MOUNTAIN',
DEATH_CHECK = 'DEATH_CHECK',
RIDERS_ATTACK = 'RIDERS_ATTACK',
}