diff options
| author | 2014-01-14 18:44:17 +0100 | |
|---|---|---|
| committer | 2014-01-14 18:44:17 +0100 | |
| commit | e0be899041064c0ffce1e32bc789bd12502a73fc (patch) | |
| tree | 01297bdcffd2ac09a07feb7d00a3612b6250fcdc /die.cpp | |
| parent | 02b524a7ff5ba793f65455b3766f93d5d8f0865d (diff) | |
| download | OneRoll-e0be899041064c0ffce1e32bc789bd12502a73fc.tar.gz OneRoll-e0be899041064c0ffce1e32bc789bd12502a73fc.zip | |
Update die.cpp
adding getFaces and getLastRolledValue API
Diffstat (limited to 'die.cpp')
| -rw-r--r-- | die.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -75,8 +75,21 @@ void Die::roll(bool adding) } } +quint64 Die::getFaces() +{ + return m_faces; +} void Die::setFaces(quint64 face) { m_faces=face; } +qint64 Die::getLastRolledValue() +{ + if(!m_rollResult.isEmpty()) + { + return m_rollResult.last(); + } + else + return 0; +} |