Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Ryan Fraser
- //200256414
- //CS115 Assignment 2
- //Filename: world.h
- //Purpose: contains the declarations for world.cpp
- #ifndef __WORLD_H__
- #define __WORLD_H__
- #include <iostream>
- #include <fstream>
- #include <string>
- #include "Location.h"
- #include <stdio.h>
- #include <stdlib.h>
- using namespace std;
- typedef int world[10][10];
- world w;
- class World
- {
- public:
- World(string);
- World(const World&);
- Location getStartLocation() const;
- bool isVictoryNode (const Location& location ) const;
- bool cangonorth (const Location& location) const;
- bool cangoeast (const Location& location) const;
- bool cangosouth (const Location& location) const;
- bool cangowest (const Location& location) const;
- Location getNorth (const Location& location) const;
- Location getEast (const Location& location) const;
- Location getSouth (const Location& location) const;
- Location getWest (const Location& location) const;
- void printDescription (const Location& location) const;
- private:
- int rows;
- int columns;
- int inaccessible;
- int start;
- int victory;
- };
- #endif
Add Comment
Please, Sign In to add comment