mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +02:00
BITNODE: IPvGO territory control strategy game (#934)
This commit is contained in:
committed by
GitHub
parent
c6141f2adf
commit
7ef12a0323
38
markdown/bitburner.go.getboardstate.md
Normal file
38
markdown/bitburner.go.getboardstate.md
Normal file
@@ -0,0 +1,38 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [Go](./bitburner.go.md) > [getBoardState](./bitburner.go.getboardstate.md)
|
||||
|
||||
## Go.getBoardState() method
|
||||
|
||||
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.
|
||||
|
||||
**Signature:**
|
||||
|
||||
```typescript
|
||||
getBoardState(): string[];
|
||||
```
|
||||
**Returns:**
|
||||
|
||||
string\[\]
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 4 GB
|
||||
|
||||
Reference in New Issue
Block a user