[atlantik-cvs] CVS: kdegames/atlantik/libatlantikui board.cpp,1.96.6.10,1.96.6.11

[email protected]
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdegames/atlantik/libatlantikui
In directory office:/tmp/cvs-serv6282/libatlantikui

Modified Files:
      Tag: KDE_3_1_BRANCH
	board.cpp 
Log Message:
more token related fixes

Index: board.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantikui/board.cpp,v
retrieving revision 1.96.6.10
retrieving revision 1.96.6.11
diff -u -d -r1.96.6.10 -r1.96.6.11
--- board.cpp	14 Jul 2003 01:30:11 -0000	1.96.6.10
+++ board.cpp	14 Jul 2003 02:53:19 -0000	1.96.6.11
@@ -85,6 +85,8 @@
 
 void AtlantikBoard::reset()
 {
+	kdDebug() << "AtlantikBoard::reset" << endl;
+
 	m_tokens.clear();
 	m_estateViews.clear();
 	m_displayQueue.clear();
@@ -199,12 +201,15 @@
 		kdDebug() << "addToken - estateView null" << endl;
 		return;
 	}
+
 	Player *playerSelf = m_atlanticCore->playerSelf();
 	if (playerSelf && playerSelf->gameId() != player->gameId())
 	{
 		kdDebug() << "addToken - not in same game" << endl;
 		return;
 	}
+	else
+		kdDebug() << "addToken - no playerSelf" << endl;
 
 	Token *token = new Token(player, this, "token");
 	m_tokens.append(token);
@@ -269,6 +274,8 @@
 void AtlantikBoard::removeToken(Player *player)
 {
 	Token *token = findToken(player);
+	if (!token)
+		return;
 
 	if (token == m_movingToken)
 	{
@@ -390,7 +397,7 @@
 	else
 		yDest = yCurrent;
 
-	kdDebug() << "TOKEN: at " << xCurrent << "," << yCurrent << " and going to " << xDest << "," << yDest << endl;
+//	kdDebug() << "TOKEN: at " << xCurrent << "," << yCurrent << " and going to " << xDest << "," << yDest << endl;
 
 	if (xCurrent != xDest || yCurrent != yDest)
 	{
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.