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

kigo

  • Kigo
  • Player
Public Types | Public Member Functions | List of all members
Kigo::Player Class Reference

#include <player.h>

Public Types

enum  Color { White = 1, Black, Invalid }
 
enum  Type { Human = 1, Computer }
 

Public Member Functions

 Player (const Player &other)
 
Color color () const
 
bool isBlack () const
 
bool isComputer () const
 
bool isHuman () const
 
bool isValid () const
 
bool isWhite () const
 
QString name () const
 
Player & operator= (const Player &other)
 
bool operator== (const Player &other) const
 
void setColor (Color color)
 
void setName (const QString &name)
 
bool setStrength (int strength)
 
void setType (Type type)
 
int strength () const
 
Type type () const
 

Detailed Description

The Player class holds all basic attributes of a Go player.

These mean mostly name, skill and color. Instances are particular to a specific game and can thus only be created by the Go engine (Kigo::Game).

Author
Sascha Peilicke sasch.nosp@m..pe@.nosp@m.gmx.d.nosp@m.e
Since
0.5

Definition at line 36 of file player.h.

Member Enumeration Documentation

enum Kigo::Player::Color
Enumerator
White 

The white player.

Black 

The black player.

Invalid 

Definition at line 41 of file player.h.

enum Kigo::Player::Type
Enumerator
Human 

A human player.

Computer 

A computer player.

Definition at line 47 of file player.h.

Constructor & Destructor Documentation

Kigo::Player::Player ( const Player &  other)

Definition at line 32 of file player.cpp.

Member Function Documentation

Color Kigo::Player::color ( ) const
inline

Definition at line 66 of file player.h.

bool Kigo::Player::isBlack ( ) const
inline

Definition at line 72 of file player.h.

bool Kigo::Player::isComputer ( ) const
inline

Definition at line 75 of file player.h.

bool Kigo::Player::isHuman ( ) const
inline

Definition at line 74 of file player.h.

bool Kigo::Player::isValid ( ) const
inline

Definition at line 73 of file player.h.

bool Kigo::Player::isWhite ( ) const
inline

Definition at line 71 of file player.h.

QString Kigo::Player::name ( ) const
inline

Definition at line 60 of file player.h.

Player & Kigo::Player::operator= ( const Player &  other)

Definition at line 38 of file player.cpp.

bool Kigo::Player::operator== ( const Player &  other) const

Definition at line 47 of file player.cpp.

void Kigo::Player::setColor ( Color  color)
inline

Definition at line 65 of file player.h.

void Kigo::Player::setName ( const QString &  name)
inline

Definition at line 59 of file player.h.

bool Kigo::Player::setStrength ( int  strength)

Definition at line 55 of file player.cpp.

void Kigo::Player::setType ( Type  type)
inline

Definition at line 68 of file player.h.

int Kigo::Player::strength ( ) const
inline

Definition at line 63 of file player.h.

Type Kigo::Player::type ( ) const
inline

Definition at line 69 of file player.h.


The documentation for this class was generated from the following files:
  • player.h
  • player.cpp
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