mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 15:28:43 +02:00
IPVGO: Add new analysis method to set a custom testing board state (#2029)
This commit is contained in:
committed by
GitHub
parent
de8c8691c2
commit
17ffabdfa5
@@ -2,7 +2,7 @@ import { Board, BoardState, OpponentStats, Play, SimpleBoard, SimpleOpponentStat
|
||||
|
||||
import { Player } from "@player";
|
||||
import { AugmentationName, GoColor, GoOpponent, GoPlayType, GoValidity } from "@enums";
|
||||
import { Go } from "../Go";
|
||||
import { Go, GoEvents } from "../Go";
|
||||
import {
|
||||
getNewBoardState,
|
||||
getNewBoardStateFromSimpleBoard,
|
||||
@@ -263,6 +263,20 @@ export function getControlledEmptyNodes(_board?: Board) {
|
||||
);
|
||||
}
|
||||
|
||||
export function setTestingBoardState(board: Board, komi?: number) {
|
||||
resetBoardState(
|
||||
() => {},
|
||||
() => {},
|
||||
GoOpponent.none,
|
||||
board.length,
|
||||
);
|
||||
Go.currentGame.board = board;
|
||||
if (komi != undefined) {
|
||||
Go.currentGame.komiOverride = komi;
|
||||
}
|
||||
GoEvents.emit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all previous board states as SimpleBoards
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user