[atlantik-cvs] CVS: kdegames/atlantik/libatlantic player.h,1.13,1.14 player.cpp,1.16,1.17
[email protected] Sun, 22 Jun 2003 02:02:13 +0200 (CEST)
Newsgroups
gmane.comp.kde.devel.atlantik
Message-ID
<[email protected] >
Update of /home/kde/kdegames/atlantik/libatlantic
In directory office:/tmp/cvs-serv32171/libatlantic
Modified Files:
player.h player.cpp
Log Message:
hide token when player goes bankrupt
Index: player.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/player.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- player.h 19 Jan 2003 23:57:26 -0000 1.13
+++ player.h 22 Jun 2003 00:02:11 -0000 1.14
@@ -40,6 +40,8 @@
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 setHasTurn(const bool hasTurn);
bool hasTurn() const { return m_hasTurn; }
void setCanRoll(bool canRoll);
@@ -64,7 +66,7 @@
private:
int m_id, m_gameId;
bool m_changed, m_isSelf;
- bool m_master, m_hasTurn, m_canRoll, m_canBuy, m_inJail;
+ bool m_master, m_bankrupt, m_hasTurn, m_canRoll, m_canBuy, m_inJail;
unsigned int m_money;
QString m_name, m_host, m_image;
Estate *m_location, *m_destination;
Index: player.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/player.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- player.cpp 19 Jan 2003 23:57:26 -0000 1.16
+++ player.cpp 22 Jun 2003 00:02:11 -0000 1.17
@@ -28,7 +28,7 @@
m_location = m_destination = 0;
m_money = 0;
m_changed = m_isSelf = false;
- m_master = m_hasTurn = m_canRoll = m_canBuy = m_inJail = false;
+ m_master = m_bankrupt = m_hasTurn = m_canRoll = m_canBuy = m_inJail = false;
}
void Player::setGame(int gameId)
@@ -63,6 +63,15 @@
if (m_master != master)
{
m_master = master;
+ m_changed = true;
+ }
+}
+
+void Player::setBankrupt(bool bankrupt)
+{
+ if (m_bankrupt != bankrupt)
+ {
+ m_bankrupt = bankrupt;
m_changed = true;
}
}