aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/diceresult.cpp
blob: 015d759c429862a71e7b1181e91aac557e6d81bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "diceresult.h"

DiceResult::DiceResult()
{

}
void DiceResult::insertResult(Die* die)
{
    m_diceValues.append(die);
}
QList<Die*>& DiceResult::getResultList()
{
    return m_diceValues;
}
void DiceResult::setResultList(QList<Die*> list)
{
    m_diceValues.clear();
    m_diceValues << 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;
}