diff options
| author | 2013-12-29 02:04:19 +0100 | |
|---|---|---|
| committer | 2013-12-29 02:04:19 +0100 | |
| commit | f30020384f816b498fe1f6013758a8de37811821 (patch) | |
| tree | 7388de7fe766fe2973d94a3256f8820e3c7fbcdf /diceresult.cpp | |
| parent | 7a1784893af6fe986503dc67672135ed05816579 (diff) | |
| download | OneRoll-f30020384f816b498fe1f6013758a8de37811821.tar.gz OneRoll-f30020384f816b498fe1f6013758a8de37811821.zip | |
Firt commit of the new dice system for rolisteam.
Diffstat (limited to 'diceresult.cpp')
| -rw-r--r-- | diceresult.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/diceresult.cpp b/diceresult.cpp new file mode 100644 index 0000000..dfdd765 --- /dev/null +++ b/diceresult.cpp @@ -0,0 +1,24 @@ +#include "diceresult.h" + +DiceResult::DiceResult() +{ + +} +void DiceResult::insertResult(qint64 die) +{ + m_diceValues.append(die); +} +QList<qint64>& DiceResult::getResultList() +{ + return m_diceValues; +} +qint64 DiceResult::getSum() +{ + qint64 sum=0; + foreach (qint64 tmp, m_diceValues) + { + sum+=tmp; + } + return sum; +} + |