kigo
Go to the documentation of this file.
25 Score::Score(
const QString &score)
26 : m_color(
'?'), m_score(0), m_lowerBound(0), m_upperBound(0)
28 if (score.size() >= 2) {
29 if (score[0] ==
'W') {
31 }
else if (score[0] ==
'B') {
34 int i = score.indexOf(
' ');
35 m_score = score.mid(2, i - 1).toFloat();
36 QString upperBound = score.section(
' ', 3, 3);
38 m_upperBound = upperBound.toFloat();
39 QString lowerBound = score.section(
' ', 5, 5);
41 m_lowerBound = lowerBound.toFloat();
45 Score::Score(
const Score &other)
46 :
QObject(), m_color(other.m_color), m_score(other.m_score)
47 , m_lowerBound(other.m_lowerBound), m_upperBound(other.m_upperBound)
53 m_color = other.m_color;
54 m_score = other.m_score;
55 m_lowerBound = other.m_lowerBound;
56 m_upperBound = other.m_upperBound;
62 return m_score >= 0 && (m_color ==
'W' || m_color ==
'B');
67 QString ret(m_color +
'+');
68 ret += QString::number(m_score) +
" (" + QString::number(m_lowerBound) +
" - " + QString::number(m_upperBound) +
')';
74 #include "moc_score.cpp"
This class represents a Go score for either player.
Score & operator=(const Score &other)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:44:15 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.