Implemented Mersenne Twister RNG.

This commit is contained in:
2023-12-31 16:32:30 -06:00
parent 73b72a8838
commit 0e5d871c68
11 changed files with 40 additions and 15 deletions
+2 -1
View File
@@ -39,6 +39,7 @@ All rights reserved.
#include "Menu.h"
#include "Merchant.h"
#include "Crawler.h"
#include "util.h"
INCLUDE_game
INCLUDE_ITEM_CATEGORIES
@@ -50,7 +51,7 @@ MerchantFunctionPrimingData Merchant::sellFunctionPrimed("CanSellItem()");
Merchant Merchant::travelingMerchant;
const Merchant&Merchant::GetRandomMerchant(Chapter chapter){
const Merchant&newMerchant=merchants[chapter][rand()%(merchants[chapter].size()-1)];
const Merchant&newMerchant=merchants[chapter][util::random()%(merchants[chapter].size()-1)];
return newMerchant;
}