ksquares
ksquaresgame.cpp
Go to the documentation of this file.
29 void KSquaresGame::createGame(const QVector<KSquaresPlayer> &startPlayers, int startWidth, int startHeight)
65 kDebug()<< "- Moving to next player:" << currentPlayer()->name() << "(" << currentPlayerId() << ")";
74 kDebug() << "- - " << currentPlayer()->name() << "(" << currentPlayerId() << ") has completed a square";
162 //cout << index1 << "," << index2 << "," << index3 << "," << index4 << " - " << lineList.size() << endl;
void clear()
void createGame(const QVector< KSquaresPlayer > &startPlayers, int startWidth, int startHeight)
Create a new game.
Definition: ksquaresgame.cpp:29
QVector< KSquaresPlayer > players
List of all the players in the game.
Definition: ksquaresgame.h:141
void append(const T &value)
const T & at(int i) const
void gameOver(const QVector< KSquaresPlayer > &)
emitted when the game board is completed. Allows you to construct a scoreboard
void resetEverything()
Sets lots of things to zero, clears lists etc.
Definition: ksquaresgame.cpp:119
void append(const T &value)
void resize(int size)
void takeTurnSig(KSquaresPlayer *)
A player's turn has started. This allows you to use AI/networking etc.
void highlightMove(int)
Emitted when the last move in a series is played by the AI.
int nextPlayer()
Moves play control to the next player, looping round when necessary.
Definition: ksquaresgame.cpp:61
const T & at(int i) const
void switchPlayer()
Externally determined player switch, for network game.
Definition: ksquaresgame.cpp:55
void checkForNewSquares()
Scans the board to see if any new squares were completed.
Definition: ksquaresgame.cpp:151
int size() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.