diff options
| author | 2014-01-05 13:12:05 +0100 | |
|---|---|---|
| committer | 2014-01-05 13:12:05 +0100 | |
| commit | 3853227d5852f45341c1ee49be4411ada78d860c (patch) | |
| tree | 12bd626e68a445b37e0c3870a996aedf8552a5c8 /diceresult.cpp | |
| parent | 4de8cf5796446b7f8b09d776e4a6a6d6b8e95cb6 (diff) | |
| download | OneRoll-3853227d5852f45341c1ee49be4411ada78d860c.tar.gz OneRoll-3853227d5852f45341c1ee49be4411ada78d860c.zip | |
Add new management of result.
It may require to make several
Diffstat (limited to 'diceresult.cpp')
| -rw-r--r-- | diceresult.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/diceresult.cpp b/diceresult.cpp index 619ccbd..6d84ce1 100644 --- a/diceresult.cpp +++ b/diceresult.cpp @@ -4,25 +4,15 @@ DiceResult::DiceResult() { } -void DiceResult::insertResult(qint64 die) +void DiceResult::insertResult(Die die) { m_diceValues.append(die); } -QList<qint64>& DiceResult::getResultList() +QList<Die>& DiceResult::getResultList() { return m_diceValues; } -qint64 DiceResult::getSum() -{ - qint64 sum=0; - foreach (qint64 tmp, m_diceValues) - { - sum+=tmp; - } - return sum; -} - -void DiceResult::setResultList(QList<qint64> list) +void DiceResult::setResultList(QList<Die> list) { m_diceValues.clear(); m_diceValues << list; |