mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
IPVGO: Handle RNG seeding and visual board updating bugs (#1258)
This commit is contained in:
committed by
GitHub
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;
|
||||
|
||||
Reference in New Issue
Block a user