[atlantik-cvs] CVS: kdegames/atlantik/libatlantic player.cpp,1.9.8.9,1.9.8.10 player.h,1.7.8.8,1.7.8.9 trade.cpp,1.17.6.2,1.17.6.3 trade.h,1.11.8.1,1.11.8.2

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

Modified Files:
      Tag: KDE_3_1_BRANCH
	player.cpp player.h trade.cpp trade.h 
Log Message:
backport of various fixes

Index: player.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/player.cpp,v
retrieving revision 1.9.8.9
retrieving revision 1.9.8.10
diff -u -d -r1.9.8.9 -r1.9.8.10
--- player.cpp	23 Jun 2003 01:24:38 -0000	1.9.8.9
+++ player.cpp	23 Jun 2003 02:54:53 -0000	1.9.8.10
@@ -27,7 +27,7 @@
 	m_name = "";
 	m_host = "";
 	m_changed = m_isSelf = false;
-	m_bankrupt = m_hasDebt = m_hasTurn = m_canRoll = m_canBuy = m_canAuction = m_canUseCard = m_inJail = false;
+	m_master = m_bankrupt = m_hasDebt = m_hasTurn = m_canRoll = m_canBuy = m_canAuction = m_canUseCard = m_inJail = false;
 }
 
 void Player::setGame(int gameId)
@@ -53,6 +53,15 @@
 	if (m_destination != destination)
 	{
 		m_destination = destination;
+		m_changed = true;
+	}
+}
+
+void Player::setMaster(bool master)
+{
+	if (m_master != master)
+	{
+		m_master = master;
 		m_changed = true;
 	}
 }

Index: player.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/player.h,v
retrieving revision 1.7.8.8
retrieving revision 1.7.8.9
diff -u -d -r1.7.8.8 -r1.7.8.9
--- player.h	23 Jun 2003 01:24:38 -0000	1.7.8.8
+++ player.h	23 Jun 2003 02:54:53 -0000	1.7.8.9
@@ -36,10 +36,12 @@
 	Estate *location() { return m_location; }
 	void setDestination(Estate *estate);
 	Estate *destination() { return m_destination; }
-	void setBankrupt(bool bankrupt);
-	bool isBankrupt() { return m_bankrupt; }
 	void setIsSelf(const bool isSelf) { m_isSelf = isSelf; }
 	bool isSelf() const { return m_isSelf; }
+	void setMaster(bool master);
+	bool master() { return m_master; }
+	void setBankrupt(bool bankrupt);
+	bool isBankrupt() { return m_bankrupt; }
 	void setHasDebt(bool hasDebt);
 	bool hasDebt() { return m_hasDebt; }
 	void setHasTurn(const bool hasTurn);
@@ -68,7 +70,7 @@
 private:
 	int m_id, m_gameId;
 	bool m_changed, m_isSelf;
-	bool m_bankrupt, m_hasDebt, m_hasTurn, m_canRoll, m_canBuy, m_canAuction, m_canUseCard, m_inJail;
+	bool m_master, m_bankrupt, m_hasDebt, m_hasTurn, m_canRoll, m_canBuy, m_canAuction, m_canUseCard, m_inJail;
 	unsigned int m_money;
 	QString m_name, m_host;
 	Estate *m_location, *m_destination;

Index: trade.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/trade.cpp,v
retrieving revision 1.17.6.2
retrieving revision 1.17.6.3
diff -u -d -r1.17.6.2 -r1.17.6.3
--- trade.cpp	23 Jun 2003 01:46:36 -0000	1.17.6.2
+++ trade.cpp	23 Jun 2003 02:54:53 -0000	1.17.6.3
@@ -1,4 +1,4 @@
-// Copyright (c) 2002 Rob Kaper <[email protected]>
+// Copyright (c) 2002-2003 Rob Kaper <[email protected]>
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -28,6 +28,12 @@
 void Trade::addPlayer(Player *player)
 {
 	mPlayers.append(player);
+	m_playerAcceptMap[player] = false;
+}
+
+void Trade::removePlayer(Player *player)
+{
+	mPlayers.remove(player);
 	m_playerAcceptMap[player] = false;
 }
 

Index: trade.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/trade.h,v
retrieving revision 1.11.8.1
retrieving revision 1.11.8.2
diff -u -d -r1.11.8.1 -r1.11.8.2
--- trade.h	23 Jun 2003 01:46:36 -0000	1.11.8.1
+++ trade.h	23 Jun 2003 02:54:53 -0000	1.11.8.2
@@ -1,4 +1,4 @@
-// Copyright (c) 2002 Rob Kaper <[email protected]>
+// Copyright (c) 2002-2003 Rob Kaper <[email protected]>
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -101,7 +101,8 @@
 	Trade(int tradeId);
 	int tradeId() { return m_tradeId; }
 
-	void addPlayer(Player *);
+	void addPlayer(Player *player);
+	void removePlayer(Player *player);
 	
 	QPtrList<Player> players() const;
 	unsigned int acceptCount();
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.