-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBoard.h
More file actions
54 lines (48 loc) · 955 Bytes
/
Board.h
File metadata and controls
54 lines (48 loc) · 955 Bytes
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
#pragma once
#include "Node.h"
#include <iostream>
#include <list>
#include <exception>
#include <string>
using namespace std;
class Board
{
public:
Node **mat;
int n;
Board(int n);
Board(const Board &b);
~Board();
void deleteB(Node **mat);
Node &operator[](list<int> l);
void operator=(char);
void operator=(const Board &b);
friend ostream &operator<<(ostream &out, const Board &b);
};
class IllegalCoordinateException : public exception
{
int a, b;
public:
void setA(int row)
{
this->a = row;
}
void setB(int col)
{
this->b = col;
}
string theCoordinate() const
{
return to_string(a) + "," + to_string(b);
}
};
class IllegalCharException : public exception
{
char input;
public:
char theChar() const
{
return input;
}
void setInput(int c) { input = c; }
};