diff --git a/markdown/bitburner.go.getgamestate.md b/markdown/bitburner.go.getgamestate.md index 56bb4016e..494dd8349 100644 --- a/markdown/bitburner.go.getgamestate.md +++ b/markdown/bitburner.go.getgamestate.md @@ -14,9 +14,11 @@ getGameState(): { whiteScore: number; blackScore: number; previousMove: [number, number] | null; + komi: number; + bonusCycles: number; }; ``` **Returns:** -{ currentPlayer: "White" \| "Black" \| "None"; whiteScore: number; blackScore: number; previousMove: \[number, number\] \| null; } +{ currentPlayer: "White" \| "Black" \| "None"; whiteScore: number; blackScore: number; previousMove: \[number, number\] \| null; komi: number; bonusCycles: number; } diff --git a/markdown/bitburner.go.getmovehistory.md b/markdown/bitburner.go.getmovehistory.md new file mode 100644 index 000000000..93b4c45cb --- /dev/null +++ b/markdown/bitburner.go.getmovehistory.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [getMoveHistory](./bitburner.go.getmovehistory.md) + +## Go.getMoveHistory() method + +Returns all the prior moves in the current game, as an array of simple board states. + +For example, a single 5x5 prior move board might look like this: + +\[
"XX.O.",
"X..OO",
".XO..",
"XXO.\#",
".XO.\#",
\] + +**Signature:** + +```typescript +getMoveHistory(): string[][]; +``` +**Returns:** + +string\[\]\[\] + diff --git a/markdown/bitburner.go.md b/markdown/bitburner.go.md index d477706a5..0a4b2c493 100644 --- a/markdown/bitburner.go.md +++ b/markdown/bitburner.go.md @@ -26,6 +26,7 @@ export interface Go | [getBoardState()](./bitburner.go.getboardstate.md) |

Retrieves a simplified version of the board state. "X" represents black pieces, "O" white, and "." empty points. "\#" are dead nodes that are not part of the subnet. (They are not territory nor open nodes.)

For example, a 5x5 board might look like this:

\[
"XX.O.",
"X..OO",
".XO..",
"XXO.\#",
".XO.\#",
\]

Each string represents a vertical column on the board, and each character in the string represents a point.

Traditional notation for Go is e.g. "B,1" referring to second ("B") column, first rank. This is the equivalent of index \[1\]\[0\].

Note that the \[0\]\[0\] point is shown on the bottom-left on the visual board (as is traditional), and each string represents a vertical column on the board. In other words, the printed example above can be understood to be rotated 90 degrees clockwise compared to the board UI as shown in the IPvGO subnet tab.

| | [getCurrentPlayer()](./bitburner.go.getcurrentplayer.md) | Returns the color of the current player, or 'None' if the game is over. | | [getGameState()](./bitburner.go.getgamestate.md) | Gets the status of the current game. Shows the current player, current score, and the previous move coordinates. Previous move coordinates will be \[-1, -1\] for a pass, or if there are no prior moves. | +| [getMoveHistory()](./bitburner.go.getmovehistory.md) |

Returns all the prior moves in the current game, as an array of simple board states.

For example, a single 5x5 prior move board might look like this:

\[
"XX.O.",
"X..OO",
".XO..",
"XXO.\#",
".XO.\#",
\]

| | [getOpponent()](./bitburner.go.getopponent.md) | Returns the name of the opponent faction in the current subnet. | | [makeMove(x, y)](./bitburner.go.makemove.md) | Make a move on the IPvGO subnet gameboard, and await the opponent's response. x:0 y:0 represents the bottom-left corner of the board in the UI. | | [opponentNextTurn(logOpponentMove)](./bitburner.go.opponentnextturn.md) | Returns a promise that resolves with the success or failure state of your last move, and the AI's response, if applicable. x:0 y:0 represents the bottom-left corner of the board in the UI. | diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 4d15d6695..bcfb207a2 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -4054,13 +4054,13 @@ export interface Go { * * For example, a single 5x5 prior move board might look like this: * - * [
- * "XX.O.",
- * "X..OO",
- * ".XO..",
- * "XXO.#",
- * ".XO.#",
- * ] + [
+ "XX.O.",
+ "X..OO",
+ ".XO..",
+ "XXO.#",
+ ".XO.#",
+ ] */ getMoveHistory(): string[][];