aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorobiwankennedy <renaud@rolisteam.org>2014-01-14 18:44:17 +0100
committerobiwankennedy <renaud@rolisteam.org>2014-01-14 18:44:17 +0100
commite0be899041064c0ffce1e32bc789bd12502a73fc (patch)
tree01297bdcffd2ac09a07feb7d00a3612b6250fcdc
parent02b524a7ff5ba793f65455b3766f93d5d8f0865d (diff)
downloadOneRoll-e0be899041064c0ffce1e32bc789bd12502a73fc.tar.gz
OneRoll-e0be899041064c0ffce1e32bc789bd12502a73fc.zip
Update die.cpp
adding getFaces and getLastRolledValue API
-rw-r--r--die.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/die.cpp b/die.cpp
index 7ab78e9..0ce09a6 100644
--- a/die.cpp
+++ b/die.cpp
@@ -75,8 +75,21 @@ void Die::roll(bool adding)
}
}
+quint64 Die::getFaces()
+{
+ return m_faces;
+}
void Die::setFaces(quint64 face)
{
m_faces=face;
}
+qint64 Die::getLastRolledValue()
+{
+ if(!m_rollResult.isEmpty())
+ {
+ return m_rollResult.last();
+ }
+ else
+ return 0;
+}