From f30020384f816b498fe1f6013758a8de37811821 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 29 Dec 2013 02:04:19 +0100 Subject: Firt commit of the new dice system for rolisteam. --- diceresult.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 diceresult.cpp (limited to 'diceresult.cpp') 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& DiceResult::getResultList() +{ + return m_diceValues; +} +qint64 DiceResult::getSum() +{ + qint64 sum=0; + foreach (qint64 tmp, m_diceValues) + { + sum+=tmp; + } + return sum; +} + -- cgit v1.2.3-70-g09d2