-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPiece.cpp
39 lines (31 loc) · 836 Bytes
/
Piece.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
// **********************************************************************
// Filename:
// Author: Hugo Argueta
// Last Modified: 05/08/15
// Description:
// **********************************************************************
//
#include "Piece.h"
using namespace std;
//default constructor. Initialized variables.
Piece::Piece() {
//piece initialized to zero.
pieceId = 0;
//pieceIcon is empty.
pieceIcon = ' ';
}
//overloaded constructor: include pieceId and pieceIcon
Piece::Piece(int pieceId, char pieceIcon) {
this->pieceId = pieceId;
this->pieceIcon = pieceIcon;
}
//Mutator method for pieceId
void Piece::setPieceId(int pieceId) {
this->pieceId = pieceId;
return;
}
//Mutator method for pieceIcon
void Piece::setPieceIcon(char pieceIcon) {
this->pieceIcon = pieceIcon;
return;
}