[atlantik-cvs] CVS: kdegames/atlantik/libatlantic player.cpp,1.9.8.3,1.9.8.4 player.h,1.7.8.2,1.7.8.3

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

Modified Files:
      Tag: KDE_3_1_BRANCH
	player.cpp player.h 
Log Message:
backport use of portfolioview in game config

Index: player.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/player.cpp,v
retrieving revision 1.9.8.3
retrieving revision 1.9.8.4
diff -u -d -r1.9.8.3 -r1.9.8.4
--- player.cpp	13 Jan 2003 17:14:39 -0000	1.9.8.3
+++ player.cpp	20 Jan 2003 23:47:36 -0000	1.9.8.4
@@ -23,10 +23,20 @@
 	m_id = playerId;
 	m_location = 0;
 	m_money = 0;
+	m_gameId = -1;
 	m_name = "";
 	m_host = "";
 	m_changed = m_isSelf = false;
 	m_hasTurn = m_canRoll = m_canBuy = m_inJail = false;
+}
+
+void Player::setGame(int gameId)
+{
+	if (m_gameId != gameId)
+	{
+		m_gameId = gameId;
+		m_changed = true;
+	}
 }
 
 void Player::setLocation(Estate *location)

Index: player.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/player.h,v
retrieving revision 1.7.8.2
retrieving revision 1.7.8.3
diff -u -d -r1.7.8.2 -r1.7.8.3
--- player.h	13 Jan 2003 17:14:39 -0000	1.7.8.2
+++ player.h	20 Jan 2003 23:47:37 -0000	1.7.8.3
@@ -30,6 +30,8 @@
 	Player(int playerId);
 
 	int id() { return m_id; }
+	void setGame(int gameId);
+	int gameId() { return m_gameId; }
 	void setLocation(Estate *estate);
 	Estate *location() { return m_location; }
 	void setIsSelf(const bool isSelf) { m_isSelf = isSelf; }
@@ -54,7 +56,7 @@
 	void changed(Player *player);
 
 private:
-	int m_id;
+	int m_id, m_gameId;
 	bool m_changed, m_isSelf;
 	bool m_hasTurn, m_canRoll, m_canBuy, m_inJail;
 	unsigned int m_money;
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.