Group_B_VirtualEscapeRoom
Functions
execution.h File Reference

Core execution functions used by parse_and_execute() More...

Go to the source code of this file.

Functions

void execute_look (const char *arg)
 Executed when the player is trying to look around the stage. More...
 
void execute_examine (const char *arg)
 Executed when the player is trying to examine an object to get more detail. More...
 
void execute_read (const char *arg)
 Attempt to "read" an object with a given tag matching arg More...
 
void execute_go (const char *arg)
 Executed when the player is trying to go to a new stage. More...
 
void execute_get (const char *arg)
 Executed when the player tries to put a usable item into their bag. More...
 
void execute_use (const char *arg)
 Executed when the player tries to use an item. More...
 
bool execute_open (const char *arg)
 Executed when the player tries to open a door. More...
 
void execute_help (void)
 Executed when the player needs directions for common commands. More...
 
void execute_map (void)
 Executed when player tries to view a map of the world. More...
 
void execute_call (const char *arg)
 Executed when the player attempst to make a call (mostly used for calling a friend) More...
 
void execute_check (void)
 Executed when the player tries to check what they currently have in their bag. More...
 
bool execute_leave (void)
 Executed when the player tries to leave the final stage. More...
 

Detailed Description

Core execution functions used by parse_and_execute()

Function Documentation

◆ execute_call()

void execute_call ( const char *  arg)

Executed when the player attempst to make a call (mostly used for calling a friend)

Attempts a call. If arg is "friend", triggers the start of puzzle 8, otherwise, prints an error message.

Parameters
[in]argName to call.

◆ execute_check()

void execute_check ( void  )

Executed when the player tries to check what they currently have in their bag.

Prints a list of usable items in the current stage.

◆ execute_examine()

void execute_examine ( const char *  arg)

Executed when the player is trying to examine an object to get more detail.

Gives more detail about a specific object. Objects are looked up by tag and matched against arg .

Parameters
[in]argTag of an object to retrieve and examine

Trigger puzzle1

◆ execute_get()

void execute_get ( const char *  arg)

Executed when the player tries to put a usable item into their bag.

Attempts to put an item referred to by tag value arg into the player's bag.

Parameters
[in]argTag of an object to get

Conditions for getting silver_key

Conditions for getting gold_key

Conditions for getting ruby_key

◆ execute_go()

void execute_go ( const char *  arg)

Executed when the player is trying to go to a new stage.

Attempts to move to a location specified by arg . The location is looked up by tag value.

Parameters
[in]argTag of a location to go to

◆ execute_help()

void execute_help ( void  )

Executed when the player needs directions for common commands.

Prints information on available commands.

◆ execute_leave()

bool execute_leave ( void  )

Executed when the player tries to leave the final stage.

Prints a congratulatory message if all three stages have been cleared. Otherwise, prints an error message.

◆ execute_look()

void execute_look ( const char *  arg)

Executed when the player is trying to look around the stage.

Gives some details about the current stage, by either specifying arg as "around" or "closely". Does nothing useful when another string is passed.

Parameters
[in]argEither "around" or "closely"

◆ execute_map()

void execute_map ( void  )

Executed when player tries to view a map of the world.

Print out a textual representation of the game map, which lays out where stages are relative to eachother.

◆ execute_open()

bool execute_open ( const char *  arg)

Executed when the player tries to open a door.

Attempt to open door with tag arg. This may do nothing useful if the door is locked.

Parameters
[in]argTag of item to open

◆ execute_read()

void execute_read ( const char *  arg)

Attempt to "read" an object with a given tag matching arg

Read is performed by printing out the object's detailed information, if the object is not hidden or otherwise inaccessible.

Parameters
[in]argTag of an object to retrieve and read

◆ execute_use()

void execute_use ( const char *  arg)

Executed when the player tries to use an item.

Attempt to use item with tag arg . Does nothing useful if the item cannot be used.

Parameters
[in]argTag of item to use