Add configurable game flow, finish punching, and audio cues
This commit is contained in:
11
miniprogram/game/rules/rulePlugin.ts
Normal file
11
miniprogram/game/rules/rulePlugin.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { type GameDefinition } from '../core/gameDefinition'
|
||||
import { type GameEvent } from '../core/gameEvent'
|
||||
import { type GameResult } from '../core/gameResult'
|
||||
import { type GameSessionState } from '../core/gameSessionState'
|
||||
|
||||
export interface RulePlugin {
|
||||
readonly mode: GameDefinition['mode']
|
||||
initialize(definition: GameDefinition): GameSessionState
|
||||
buildPresentation(definition: GameDefinition, state: GameSessionState): GameResult['presentation']
|
||||
reduce(definition: GameDefinition, state: GameSessionState, event: GameEvent): GameResult
|
||||
}
|
||||
Reference in New Issue
Block a user