Files
linux-odyssey/packages/game/condition/OrMatcher.ts
T

11 lines
287 B
TypeScript

import { ICommand } from '../schema'
import { Matcher } from './Matcher.js'
export class OrMatcher implements Matcher {
constructor(private conditions: Matcher[]) {}
match(command: ICommand): boolean {
return this.conditions.some((condition) => condition.match(command))
}
}