-
Notifications
You must be signed in to change notification settings - Fork 0
/
DoughnutModeGame.h
35 lines (26 loc) · 1.1 KB
/
DoughnutModeGame.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
// a. Michael Bertagna
// b. 2353491
// c. bertagna@chapman.edu
// d. CPSC 350-01
// e. Assignment 3
/* DoughnutModeGame.h is a header file which lays out the elements of the DoughnutModeGame derived class (base class: Game). */
#ifndef DOUGHNUTMODEGAME_H
#define DOUGHNUTMODEGAME_H
#include <iostream>
#include "Game.h"
using namespace std;
class DoughnutModeGame : public Game{
protected:
public:
//overloaded constructor: specify occupancy via map file
DoughnutModeGame(int height, int width, string gridString) : Game(height, width, gridString){}
//overloaded constructor: random occupancy
DoughnutModeGame(int height, int width, double density) : Game(height, width, density){}
// checks number of neighbors above a cell in the grid
int checkAboveNeighbors (int row, int col) override;
// checks number of neighbors below a cell in the grid
int checkBelowNeighbors(int row, int col) override;
// checks number of neighbors to the side of a cell in the grid
int checkSideNeighbors(int row, int col) override;
};
#endif