STOCKMARKET: Added slight randomization to when stock forecasts can flip (#911)

This commit is contained in:
Caldwell 2023-12-03 09:45:42 +01:00 committed by GitHub
parent 997ae8c176
commit 8b6caeb68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,6 +14,7 @@ import { dialogBoxCreate } from "../ui/React/DialogBox";
import { Reviver } from "../utils/JSONReviver";
import { NetscriptContext } from "../Netscript/APIWrapper";
import { helpers } from "../Netscript/NetscriptHelpers";
import { getRandomInt } from "../utils/helpers/getRandomInt";
export let StockMarket: IStockMarket = {
lastUpdate: 0,
@ -167,7 +168,7 @@ export function initStockMarket(): void {
StockMarket.storedCycles = 0;
StockMarket.lastUpdate = 0;
StockMarket.ticksUntilCycle = StockMarketConstants.TicksPerCycle;
StockMarket.ticksUntilCycle = getRandomInt(1, StockMarketConstants.TicksPerCycle);
initSymbolToStockMap();
}