-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.h
56 lines (47 loc) · 1.85 KB
/
constants.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
/*******************************************************************************
* Constants Configuration *
* For Pacman Game (COMP 11 Project 1 | 2016 Spring) *
* written by: Michael Edegware *
* Date: 3/26/2016 *
* Joke: Q. A programmer was going for work, so his wife told him that while he*
* is out, he should get some decorations for her. He never came back. *
******************************************************************************/
#ifndef CONSTANTS_H_INCLUDED
#define CONSTANTS_H_INCLUDED
const int ROWS = 21; // to account for boundaries
const int COLS = 61;
const char SPACE = ' ';
const char BORD_TOP = '-';
const char BORD_CORN = '+';
const char BORD_SIDE = '|';
const char DOT = 'o';
const char BOULDER = 'X';
const char CMD_UP = 'w';
const char CMD_DWN = 's';
const char CMD_LFT = 'a';
const char CMD_RGT = 'd';
const char CMD_QUIT = 'q';
const char GHOST = 'm';
const char LEFT = '>';
const char RIGHT = '<';
const char UP = 'v';
const char DOWN = '^';
const int NUM_GHOSTS = 4;
const int NUM_LEVELS = 10;
const int DOTS_PER_LEVEL = 15;
const int NUM_DOTS = DOTS_PER_LEVEL * NUM_LEVELS;
const int BOULDERS_PER_LEVEL = 1;
const int NUM_BOULDERS = BOULDERS_PER_LEVEL * NUM_LEVELS;
const int GHOST_INITIAL_POS = 0;
const int MIN_BOULDER_WIDTH = COLS / 10;
const int MAX_BOULDER_WIDTH = COLS / 4;
const int MIN_BOULDER_HEIGHT = ROWS / 10;
const int MAX_BOULDER_HEIGHT = ROWS / 4;
/* the user gets points for eating a dot and beating a level */
const int DOT_REWARD = 1;
const int LEVEL_REWARD = 10;
/* the ghosts moves once for every GHOST_FREQ moves the user makes */
const int GHOST_FREQ = 2;
/* pace of game set at SPEED/10 seconds */
const int SPEED = 3;
#endif