mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-25 17:13:47 +01:00
IPVGO: Handle RNG seeding and visual board updating bugs (#1258)
This commit is contained in:
parent
b53c35126e
commit
591ad45154
@ -8,7 +8,7 @@ import { floor } from "./boardState";
|
||||
type rand = (n1: number, n2: number) => number;
|
||||
|
||||
export function addObstacles(boardState: BoardState) {
|
||||
const rng = new WHRNG(Player.totalPlaytime);
|
||||
const rng = new WHRNG(Player.totalPlaytime ?? new Date().getTime());
|
||||
const random = (n1: number, n2: number) => n1 + floor((n2 - n1 + 1) * rng.random());
|
||||
|
||||
const shouldRemoveCorner = !random(0, 4);
|
||||
|
@ -166,6 +166,7 @@ export function GoGameboardWrapper({ showInstructions }: GoGameboardWrapperProps
|
||||
|
||||
function setTraditional(newValue: boolean) {
|
||||
Settings.GoTraditionalStyle = newValue;
|
||||
rerender();
|
||||
}
|
||||
|
||||
const endGameAvailable = boardState.previousPlayer === GoColor.white && boardState.passCount;
|
||||
|
Loading…
Reference in New Issue
Block a user