• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

kigo

  • sources
  • kde-4.14
  • kdegames
  • kigo
  • src
  • game
score.h
Go to the documentation of this file.
1 /*
2  Copyright 2008 Sascha Peilicke <sasch.pe@gmx.de>
3 
4  This program is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public License as
6  published by the Free Software Foundation; either version 2 of
7  the License or (at your option) version 3 or any later version
8  accepted by the membership of KDE e.V. (or its successor approved
9  by the membership of KDE e.V.), which shall act as a proxy
10  defined in Section 14 of version 3 of the license.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef KIGO_SCORE_H
22 #define KIGO_SCORE_H
23 
24 #include <QObject>
25 #include <QString>
26 
27 namespace Kigo {
28 
38 class Score : public QObject
39 {
40  Q_OBJECT
41 
42  friend class Game;
43 
44 private:
45  Score(const QString &score = QString());
46 
47 public:
48  Score(const Score &other);
49  Score &operator=(const Score &other);
50 
51  bool isValid() const;
52  QString toString() const;
53 
54  QChar color() const { return m_color; }
55  float score() const { return m_score; }
56  float lowerBound() const { return m_lowerBound; }
57  float upperBound() const { return m_upperBound; }
58 
59 private:
60  QChar m_color;
61  float m_score;
62  float m_lowerBound;
63  float m_upperBound;
64 };
65 
66 } // End of namespace Kigo
67 
68 #endif
Kigo::Score
This class represents a Go score for either player.
Definition: score.h:38
Kigo::Score::toString
QString toString() const
Definition: score.cpp:65
Kigo::Score::operator=
Score & operator=(const Score &other)
Definition: score.cpp:51
QChar
Kigo::Score::score
float score() const
Definition: score.h:55
Kigo::Score::color
QChar color() const
Definition: score.h:54
QObject
QString
Kigo::Score::isValid
bool isValid() const
Definition: score.cpp:60
Kigo::Score::lowerBound
float lowerBound() const
Definition: score.h:56
Kigo::Game
The Game class implements the Go game and acts as a wrapper around a remote Go Game game implementing...
Definition: game.h:60
Kigo::Score::upperBound
float upperBound() const
Definition: score.h:57
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kigo

Skip menu "kigo"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal