-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgooseEscapeGamePlay.hpp
87 lines (67 loc) · 2.69 KB
/
gooseEscapeGamePlay.hpp
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//THIS IS THE START OF THE gooseEscapeGamePlay.hpp FILE
#ifndef GOOSE_ESCAPE_GAMEPLAY
#define GOOSE_ESCAPE_GAMEPLAY
#include <cstdlib>
#include "gooseEscapeUtil.hpp"
#include "gooseEscapeActors.hpp"
#include "gooseEscapeConsole.hpp"
/*This file is all about the game world. You will modify this to add
constants and function prototypes. Modify gooseGamePlay.cpp to
actually add functionality.
*/
/*
Declare constants to indicate various game world features in the board
array. Modify them to fit what you would like to do in the game. You can
change the type if you choose to store your game board as something other
than intengers.
*/
// Going further: Learn how to use an enum for these values
//represents the walls int he game board array
const int EMPTY = 0;
const int SHALL_NOT_PASS = 1;
//these are the coordinates of the safe space character
const int WINX = 38;
const int WINY = 9;
//represents the winner/safe space in the game board array
const int WINNER = 2;
//the x and y values of the top left corner of wall1, and wall length and thickness
const int WALL1Y = 5;
const int WALL1X = 30;
const int WALLTHICK = 3;
const int WALL1_LENGTH = 20;
const int WALL2Y = 5;
const int WALL2X = 27;
const int WALL2_LENGTH = 9;
const int WALL3Y = 11;
const int WALL3X = 30;
const int WALL4Y = 5;
const int WALL4X = 47;
const int WALL4_LENGTH = 3;
//declares starting coordinates of the player and monster
const int PLAYERX_START = 10;
const int PLAYERY_START = 10;
const int MONSTERX_START = 70;
const int MONSTERY_START = 20;
const int POWER_UP_LENGTH = 12;
const char PUT_WALL = 'P';
const char DELETE_WALL = 'D';
//display characters
const int PLAYER_CHAR = int('@');
const int MONSTER_CHAR = int('G');
const int WALL_CHAR = int('o');
const int WIN_CHAR = int('W');
const int SPEED_CHAR = int('P');
//descriptions of all functions listed below are in the corresponding cpp file
bool win(Actor const & player);
void randomLocation(int & randXcoord, int & randYcoord, int gameBoard[NUM_BOARD_Y][NUM_BOARD_X]);
void chasingPerson(Actor const & player, Actor & monster,
int gameBoard[NUM_BOARD_Y][NUM_BOARD_X]);
bool captured(Actor const & player, Actor const & monster);
void movePlayer(int key, Actor & player, int gameBoard[NUM_BOARD_Y][NUM_BOARD_X]);
void wallSet(int row, int col, int thickness, int wall_length,
int gameBoard[NUM_BOARD_Y][NUM_BOARD_X], char action);
void randomMove(Actor speedPowerUp);
void playerHitSpeedPow(Actor & player, Actor & powerUp, int & turnCount, int & powSpeedCounter);
void print(int gameBoard[NUM_BOARD_Y][NUM_BOARD_X]);
#endif
//THIS IS THE END OF THE gooseEscapeGamePlay.hpp FILE