-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.h
More file actions
37 lines (32 loc) · 664 Bytes
/
Game.h
File metadata and controls
37 lines (32 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef GAME_H
#define GAME_H
#include <iostream>
#include <cassert>
#include "World.h"
#include "ItemManager.h"
#include "Location.h"
#include "Node.h"
using namespace std;
class Game
{
public:
Game (const string& game_name);
bool isOver () const;
int getScore () const;
void printDescription () const;
void printInventory () const;
void reset ();
void moveNorth ();
void moveSouth ();
void moveEast ();
void moveWest ();
void takeItem (char id);
void leaveItem (char id);
World world;
ItemManager itemmanager;
Location player_location;
private:
void moveTo (const Location& location);
bool invariant () const;
};
#endif