-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTurn.cpp
40 lines (33 loc) · 906 Bytes
/
Turn.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
//
// Turn.cpp
// Tablero SUPER FINAL
/* int turnAct;
int numTurns;
int playerT;
int tileTI;
char typeTileT;
int tileTF;
int diceT;
*/ //Created by Matías Méndez on 06/06/20.
// Copyright © 2020 Matías Méndez. All rights reserved.
//
#include <stdio.h>
#include "Turn.h"
#include <iostream>
using namespace std;
Turn::Turn(int _nTurns, int pla, int tiI, int dic, char type, int tiF){
turnAct = _nTurns;
playerT = pla;
tileTI = tiI;
diceT = dic;
typeTileT = type;
tileTF = tiF;
}
//El operador << pertenece a la libreria ostream
//con esta sobrecarga es más fácil imprimir todos los atributos de esta clase
ostream & operator << (ostream &os, const Turn &t2){
//se regresara un objeto de tipo ostream
os << t2.turnAct <<" "<<t2.playerT <<" "<<t2.tileTI<<" "
<<t2.diceT<<" "<<t2.typeTileT<<" "<<t2.tileTF <<endl;
return os;
}