mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 17:23:53 +01:00
1.1 KiB
1.1 KiB
Home > bitburner > Go > passTurn
Go.passTurn() method
Pass the player's turn rather than making a move, and await the opponent's response. This ends the game if the opponent passed on the previous turn, or if the opponent passes on their following turn.
This can also be used if you pick up the game in a state where the opponent needs to play next. For example: if BitBurner was closed while waiting for the opponent to make a move, you may need to call passTurn() to get them to play their move on game start.
Signature:
passTurn(): Promise<{
type: "move" | "pass" | "gameOver";
x: number | null;
y: number | null;
}>;
Returns:
Promise<{ type: "move" | "pass" | "gameOver"; x: number | null; y: number | null; }>
a promise that contains the opponent move's x and y coordinates (or pass) in response, or an indication if the game has ended
Remarks
RAM cost: 0 GB