diff --git a/src/Go/boardState/boardState.ts b/src/Go/boardState/boardState.ts index 83152baaa..644506624 100644 --- a/src/Go/boardState/boardState.ts +++ b/src/Go/boardState/boardState.ts @@ -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)); diff --git a/src/Go/effects/netscriptGoImplementation.ts b/src/Go/effects/netscriptGoImplementation.ts index f474041f8..699bc7a83 100644 --- a/src/Go/effects/netscriptGoImplementation.ts +++ b/src/Go/effects/netscriptGoImplementation.ts @@ -337,7 +337,7 @@ function logEndGame(logger: (s: string) => void) { * Clears the board, resets winstreak if applicable */ export function resetBoardState(error: (s: string) => void, opponent: GoOpponent, boardSize: number) { - if (![5, 7, 9, 13].includes(boardSize)) { + if (![5, 7, 9, 13].includes(boardSize) && opponent !== GoOpponent.w0r1d_d43m0n) { error(`Invalid subnet size requested (${boardSize}), size must be 5, 7, 9, or 13`); return; } @@ -412,7 +412,7 @@ export async function determineCheatSuccess( * Cheating success rate scales with player's crime success rate, and decreases with prior cheat attempts. */ export function cheatSuccessChance(cheatCount: number) { - return Math.min(0.6 * (0.8 ^ cheatCount) * Player.mults.crime_success, 1); + return Math.min(0.6 * 0.65 ** cheatCount * Player.mults.crime_success, 1); } /**