Hunt The Wumpus/C++: Difference between revisions

(Created page with "This version is based on the original game, so it diverges a little from the task! =={{header|C++}}== <lang cpp> #include <time.h> #include <iostream> #include <sstream> typ...")
 
Line 48:
void msg( std::string s ) { std::cout << s; }
void msg( int i ) { std::cout << i; }
void wait() { std::cin.get(); }
};
 
Line 54:
{
public:
int getExit( int i ) { return exits[i]; }
byte contains() { return obj; }
void clear( object o ) { obj ^= o; }
void clearRoom() { obj = NOTHING; }
void setExit( int i, int e ) { exits[i] = e; }
void populate( object o ) { obj |= o; }
 
Line 98:
{
private:
inOut inOut;
cave theCave;
unsigned seed, playerPos, wumpusPos, pathLen, arrowsCnt, exits[MAX_EXITS], arrowPath[A_PATH_LEN], saved[SAVED];
bool gameOver, playerWins;