You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
536 B

import { Phase } from "./enums";
import { assert } from "./utils";
export class PlanDayCommand {
/**
* Executes the plan day command
* @param {import(".").GameState} game_state
* @returns {import(".").GameState}
*/
execute(game_state) {
assert(
game_state.time.phase === Phase.CLOSE,
"store must be closed before you can plan",
);
return {
...game_state,
time: {
...game_state.time,
day: game_state.time.day + 1,
phase: Phase.PLANNING,
},
};
}
}