Trusted by +2 million users,
1000+ happy students everyday
Showing pages 1 to 1 of 1 pages
#include <stdio.h>int getTotalKeys();int getCurrentKeys();int getNumSteps(); // returns the number of steps which you have made so far.Might be useful for debugging purposes.void getCurrentPosition(int * arr); // this puts the player's row into arr[0],and the player's column into arr[1].void readMaze(); // points will be taken off if you use this.void printMaze(); // prints the current maze. Might be useful for debugging.int isComplete(); //returns 1 if the maze is complete, and 0 otherwise. Usefulfor loop conditionsint move(int newRow, int newCol); // if possible, it moves the player to theposition specified. If not possible, it prints a handy error messageexplaining what happened. You are definitely allowed to comment out the printstatements if you get tired of seeing the error messages.int look(int newRow, int newCol); // if possible, it tells you what's in thesquare you are looking at. It also returns the integer value of what is in thesquare (see maze file explanation). If not possible, it prints a handy errormessage explaining what happened. You are definitely allowed to comment outthe print statements if you get tired of seeing the error messages.
desklib-logo
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document