thrive/01_text_adventure/predicate.h
2025-01-21 21:01:32 -05:00

26 lines
474 B
C

#ifndef _FD_PREDICATE_
#define _FD_PREDICATE_
typedef struct Predicate Predicate;
typedef enum PredicateType {
PREDICATE_TRUE,
PREDICATE_IN_ROOM,
PREDICATE_ITEM_HERE,
PREDICATE_HAS_ITEM,
PREDICATE_FLAG_ENABLED,
} PredicateType;
#include "game.h"
struct Predicate {
PredicateType type;
char *argument;
};
bool predicate_fulfilled(Game *g, Predicate *p);
Predicate *create_predicate(Game *g, const char *string);
void print_predicate(Predicate *p);
#endif