-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost.cpp
43 lines (37 loc) · 793 Bytes
/
post.cpp
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
//T09_G12
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <limits>
#include <algorithm>
#include <stdio.h>
#include <chrono>
#include <iomanip>
#include <algorithm>
//our files
#include "Post.h"
#include "Move_pos.h"
//constructor
Post::Post(int row_input, int col_input, char type_input){
row = row_input;
col = col_input;
type = type_input;
}
//getter
int Post::getRow() const {return row;}
int Post::getCol() const {return col;}
char Post::getSymbol() const {return type;}
//setter
void Post::setType(char type_sel) {
type = type_sel;
}
//functions
bool Post::isElectrified() const { //return if normal post or electrified (true if it is)
if (type == electric){
return true;
}
else{
return false;
}
}