35 |
Turn::Turn() |
Turn::Turn() |
36 |
{ |
{ |
37 |
num = 0; |
num = 0; |
38 |
|
player = 0; |
39 |
pldrack = PlayedRack(); |
pldrack = PlayedRack(); |
40 |
round = Round(); |
round = Round(); |
41 |
} |
} |
81 |
} |
} |
82 |
|
|
83 |
|
|
84 |
PlayedRack Turn::getPlayedRack() const |
const PlayedRack& Turn::getPlayedRack() const |
85 |
{ |
{ |
86 |
return pldrack; |
return pldrack; |
87 |
} |
} |
88 |
|
|
89 |
|
|
90 |
Round Turn::getRound() const |
const Round& Turn::getRound() const |
91 |
{ |
{ |
92 |
return round; |
return round; |
93 |
} |
} |
102 |
} |
} |
103 |
|
|
104 |
|
|
105 |
string |
std::string |
106 |
Turn::toString(bool showExtraSigns) const |
Turn::toString(bool showExtraSigns) const |
107 |
{ |
{ |
108 |
string rs = ""; |
std::string rs = ""; |
109 |
if (showExtraSigns) |
#ifdef DEBUG |
110 |
{ |
char buff[10]; |
111 |
rs = ""; // TODO |
sprintf(buff,"[n:%d,p:%d] ",num,player); |
112 |
} |
rs += std::string(buff); |
113 |
rs = rs + pldrack.toString() + " " + round.toString(); |
#endif |
114 |
|
rs += pldrack.toString(10,PlayedRack::RACK_EXTRA); |
115 |
|
rs += round.toString(); |
116 |
return rs; |
return rs; |
117 |
} |
} |
118 |
|
|