-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrook.hpp
35 lines (28 loc) · 1.1 KB
/
rook.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
/****************************************************
* *
* 550 - Integrated Programming Laboratory *
* Lab Assessment 2: C++ 3 *
* Oliver Grubin, November/December 2014 *
* *
* rook.hpp *
* Header file for Rook class *
* *
*****************************************************/
#ifndef ROOK_H
#define ROOK_H
#include "ChessPiece.hpp"
class rook : public ChessPiece
{
public:
// Constructor. Sets up the rook's color and the vector of possible directions
rook(Color _color);
private:
// Returns true if the rook can move from source to destination.
bool validDirection(int source, int destination) const;
// Outputs the string "Rook"
std::ostream &output(std::ostream &out) const;
// Outputs the unicode symbol for the rook
std::ostream &outputS(std::ostream &out) const;
};
#endif