forked from Carlos231/Hunt-the-Wumpus-Game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.h
62 lines (53 loc) · 1.38 KB
/
game.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/******************************************************
** Program:Hunt_Wumpus.cpp
** Author: Carlos Lopez Molina
** Date: 05/22/2016
** Description: Hunt the Wumpus game
** Input: Choose size of cave, select where want to go.
** Output: Win or loose game.
******************************************************/
#ifndef GAME_H
#define GAME_H
#include <iostream>
#include <cstdlib>
#include <time.h>
#include "room.h"
using namespace std;
class Game : Room{
protected:
Room **rooms;//array of rooms
int gridSize, arrows, numGold;
//starting position location (also rope location)
int player_start_x, player_start_y, player_position_x, player_position_y, player_action;
char movement;
bool gameover, won, startingOver, wumpusdead;
public:
//constructors
Game();
//mutators
void set_gridSize();
void set_rooms();
void set_event_in_rooms();
void set_movement();
void set_starting_position();
int set_random_position();
void adjust_arrows();
bool inbounds(int, int);
//accessors
char get_movement();
void get_player_action();
bool get_won();
//deconstructor
~Game();
//game functions
void run_game(int);
void output_grid();
void move_player();
void check_event();
void menu();
void output_messages();
void shoot_arrow();
void endgame();
void check_if_won();
};
#endif