aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/diceresult.cpp
diff options
context:
space:
mode:
authorobiwankennedy <renaud@rolisteam.org>2014-01-07 19:00:40 +0100
committerobiwankennedy <renaud@rolisteam.org>2014-01-07 19:00:40 +0100
commit5c36f34d6be47ce1747eeb7dd5059b905e42b914 (patch)
tree43354551210d7f17ef77219380edd2b92675485e /diceresult.cpp
parent2cec67439c02d8ef5f925c7fb364b8e205381aa1 (diff)
downloadOneRoll-5c36f34d6be47ce1747eeb7dd5059b905e42b914.tar.gz
OneRoll-5c36f34d6be47ce1747eeb7dd5059b905e42b914.zip
Update diceresult.cpp
better management of scalar mode
Diffstat (limited to 'diceresult.cpp')
-rw-r--r--diceresult.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/diceresult.cpp b/diceresult.cpp
index 8fcc5b3..c000623 100644
--- a/diceresult.cpp
+++ b/diceresult.cpp
@@ -19,9 +19,18 @@ void DiceResult::setResultList(QList<Die> list)
}
bool DiceResult::isScalar() const
{
+ if(m_diceValues.size()==1)
+ {
+ return true;
+ }
return false;
}
qint64 DiceResult::getScalar()
{
+
+ if(m_diceValues.size()==1)
+ {
+ return m_diceValues[0].getValue();
+ }
return 0;
}