doggo-quest-logic
Version:
The game logic for the Doggo Quest text-based game sample project
23 lines (22 loc) • 749 B
TypeScript
import { GameObject } from '../World/GameObject';
import { Room } from '../World/Room';
export declare class Word {
text: string;
reduced: string | undefined;
private readonly tags;
parent: Word | null;
children: Word[];
gameObject: GameObject | null;
room: Room | undefined;
constructor(text: string, reduced: string | undefined, initialTags: string[]);
readonly tagNames: string[];
readonly hasChildren: boolean;
readonly isNoun: boolean;
readonly isDirection: boolean;
readonly isVerb: boolean;
readonly isAdverb: boolean;
hasTag(tagName: string): boolean;
addTag(tagName: string): Word;
removeTag(tagName: string): Word;
addChild(word: Word): Word;
}