mirror of
https://github.com/kierankihn/uno-game.git
synced 2025-12-27 10:23:16 +08:00
chore: renamed utils to Utils
This commit is contained in:
26
src/common/Utils.cpp
Normal file
26
src/common/Utils.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @file utils.cpp
|
||||
*
|
||||
* @author Yuzhe Guo
|
||||
* @date 2025.11.15
|
||||
*/
|
||||
#include "Utils.h"
|
||||
|
||||
namespace UNO::COMMON {
|
||||
Random::Random() : rd_(), gen_(rd_()) {}
|
||||
std::mt19937 &Random::getGenerator() {
|
||||
return gen_;
|
||||
}
|
||||
|
||||
Utils *Utils::getInstance() {
|
||||
if (Utils::instance_ == nullptr) {
|
||||
Utils::instance_ = new Utils();
|
||||
}
|
||||
return Utils::instance_;
|
||||
}
|
||||
Random &Utils::getRandom() {
|
||||
return this->random_;
|
||||
}
|
||||
|
||||
|
||||
} // UNO
|
||||
Reference in New Issue
Block a user