First Commit
This commit is contained in:
commit
3796ec5cd2
146 files changed
+4825
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include <QStringList>
|
||||
#include <QList>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
namespace Roster {
|
||||
struct ParsedNames {
|
||||
QStringList names;
|
||||
QString error;
|
||||
bool ok() const { return error.isEmpty(); }
|
||||
};
|
||||
ParsedNames parse(const QString &text);
|
||||
|
||||
class Session {
|
||||
public:
|
||||
void setNames(const QStringList &names);
|
||||
void resetDraw();
|
||||
const QStringList &names() const { return m_names; }
|
||||
int remainingCount() const { return static_cast<int>(m_pool.size()); }
|
||||
QStringList draw(int count, QRandomGenerator &random);
|
||||
QList<QStringList> groups(int value, bool valueIsGroupCount,
|
||||
QRandomGenerator &random) const;
|
||||
private:
|
||||
QStringList m_names;
|
||||
QStringList m_pool;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user