mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
IPVGO: Updated DocString for the gameState object to correctly state that a null move is returned when the opponent passes or when there is no previous move. (#2158)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
## Go.getGameState() method
|
||||
|
||||
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.
|
||||
Gets the status of the current game. Shows the current player, current score, and the previous move coordinates. Previous move will be null for a pass, or if there are no prior moves.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ export interface Go
|
||||
| --- | --- |
|
||||
| [getBoardState()](./bitburner.go.getboardstate.md) | <p>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.)</p><p>For example, a 5x5 board might look like this:</p><p>\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]</p><p>Each string represents a vertical column on the board, and each character in the string represents a point.</p><p>Traditional notation for Go is e.g. "B,1" referring to second ("B") column, first rank. This is the equivalent of index \[1\]\[0\].</p><p>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.</p> |
|
||||
| [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. |
|
||||
| [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 will be null for a pass, or if there are no prior moves. |
|
||||
| [getMoveHistory()](./bitburner.go.getmovehistory.md) | <p>Returns all the prior moves in the current game, as an array of simple board states.</p><p>For example, a single 5x5 prior move board might look like this:</p><p>\[<br/> "XX.O.",<br/> "X..OO",<br/> ".XO..",<br/> "XXO.\#",<br/> ".XO.\#",<br/> \]</p> |
|
||||
| [getOpponent()](./bitburner.go.getopponent.md) | Returns the name of the opponent faction in the current subnet. |
|
||||
| [makeMove(x, y, playAsWhite)](./bitburner.go.makemove.md) | Make a move on the IPvGO subnet game board, and await the opponent's response. x:0 y:0 represents the bottom-left corner of the board in the UI. |
|
||||
|
||||
@@ -289,7 +289,7 @@ export function getHistory(): string[][] {
|
||||
/**
|
||||
* 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.
|
||||
* Previous move will be null for a pass, or if there are no prior moves.
|
||||
*
|
||||
* Also provides the white player's komi (bonus starting score), and the amount of bonus cycles from offline time remaining
|
||||
*/
|
||||
|
||||
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -4920,7 +4920,7 @@ export interface Go {
|
||||
/**
|
||||
* 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.
|
||||
* Previous move will be null for a pass, or if there are no prior moves.
|
||||
*/
|
||||
getGameState(): {
|
||||
currentPlayer: "White" | "Black" | "None";
|
||||
|
||||
Reference in New Issue
Block a user