-
Notifications
You must be signed in to change notification settings - Fork 0
/
board.hpp
53 lines (48 loc) · 1.25 KB
/
board.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
/***************************************************************************************************
** Author: Kurt Kaiser
** Website: kurtkaiser.us
** Info: Designed a one-player, text-based game, the player can move through
** spaces to get items and accomplish goals.
****************************************************************************************************/
#pragma once
#ifndef QUEUE_HPP
#define QUEUE_HPP
#include "space.hpp"
#include "house.hpp"
#include "empty.hpp"
#include "player.hpp"
struct BoardNode
{
Space* val;
BoardNode *right;
BoardNode *left;
BoardNode *up;
BoardNode *down;
};
// Defining the interface for the class
class Board
{
private:
// Declaring private variables
struct BoardNode* head;
struct BoardNode* playerTile;
Player player;
public:
// Class Default Constructor
Board();
~Board();
// Declaring public member functions
bool isEmpty();
void addBack(Space*);
Space* getFront();
BoardNode* getPlayerTile();
void removeFront();
void createBoard(int, int);
void connectBoard();
void printBoard();
BoardNode* moveRight(BoardNode*);
BoardNode* moveLeft(BoardNode*);
BoardNode* moveDown(BoardNode*);
BoardNode* moveUp(BoardNode*);
};
#endif