2 * @file HaveGameTime.cpp
3 * @brief
\83Q
\81[
\83\80\83^
\83C
\83\80\95Û
\8e\9d\92\8a\8fÛ
\83N
\83\89\83X
\82ð
\92è
\8b`
\82·
\82é
10 #include "HaveGameTime.h"
14 HaveGameTime::HaveGameTime(void)
20 HaveGameTime::~HaveGameTime(void)
26 void HaveGameTime::WipeData(void)
32 GAME_TIME HaveGameTime::GetGameTime(void)
37 TURN HaveGameTime::GetTurn(void)
42 TURN HaveGameTime::GetWait(void)
47 void HaveGameTime::PlusWait(ACTION_WAIT plusWait, bool normalRand)
49 double wait = normalRand ? Dice::CastNormalRand(plusWait, 5) : plusWait;
50 if(plusWait <= 0) plusWait = 1;
51 this->wait += plusWait;
52 std::normal_distribution<> distWait(wait, GameConstants::ActionWaitDeviation);
53 this->wait += (ACTION_WAIT)distWait(Dice::mt);
56 bool operator<(HaveGameTime left, HaveGameTime right)
58 return left.GetWait() < right.GetWait();
61 bool operator>(HaveGameTime left, HaveGameTime right)
63 return left.GetWait() > right.GetWait();