mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 11:10:58 +02:00
IPVGO: Bugfix: Require special opponent to be on the fixed size board (#1170)
This commit is contained in:
committed by
GitHub
parent
d81358c80f
commit
dd4b54406c
@@ -23,6 +23,7 @@ export function getNewBoardState(
|
||||
): BoardState {
|
||||
if (ai === GoOpponent.w0r1d_d43m0n) {
|
||||
boardToCopy = resetCoordinates(rotate90Degrees(boardFromSimpleBoard(bitverseBoardShape)));
|
||||
boardSize = 19;
|
||||
}
|
||||
|
||||
const newBoardState: BoardState = {
|
||||
@@ -166,12 +167,12 @@ export function updateChains(board: Board, resetChains = true): void {
|
||||
* Modifies the board in place.
|
||||
*/
|
||||
export function updateCaptures(board: Board, playerWhoMoved: GoColor, resetChains = true): void {
|
||||
const boardState = updateChains(board, resetChains);
|
||||
updateChains(board, resetChains);
|
||||
const chains = getAllChains(board);
|
||||
|
||||
const chainsToCapture = findAllCapturedChains(chains, playerWhoMoved);
|
||||
if (!chainsToCapture?.length) {
|
||||
return boardState;
|
||||
return;
|
||||
}
|
||||
|
||||
chainsToCapture?.forEach((chain) => captureChain(chain));
|
||||
|
||||
Reference in New Issue
Block a user