T007–T011: implement AdvanceTurn domain logic (pure function, events, invariants, 8 acceptance tests)
This commit is contained in:
15
packages/domain/src/events.ts
Normal file
15
packages/domain/src/events.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { CombatantId } from "./types.js";
|
||||
|
||||
export interface TurnAdvanced {
|
||||
readonly type: "TurnAdvanced";
|
||||
readonly previousCombatantId: CombatantId;
|
||||
readonly newCombatantId: CombatantId;
|
||||
readonly roundNumber: number;
|
||||
}
|
||||
|
||||
export interface RoundAdvanced {
|
||||
readonly type: "RoundAdvanced";
|
||||
readonly newRoundNumber: number;
|
||||
}
|
||||
|
||||
export type DomainEvent = TurnAdvanced | RoundAdvanced;
|
||||
Reference in New Issue
Block a user