mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 18:50:56 +02:00
CODEBASE: Fix lint errors 4 (#1773)
Co-authored-by: Michael Ficocelli <ficocemt@gmail.com>
This commit is contained in:
@@ -696,16 +696,14 @@ export function getPreviousMove(): [number, number] | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (const rowIndexString in Go.currentGame.board) {
|
||||
const row = Go.currentGame.board[+rowIndexString] ?? [];
|
||||
for (const pointIndexString in row) {
|
||||
const point = row[+pointIndexString];
|
||||
const priorColor = point && priorBoard && getColorOnBoardString(priorBoard, point.x, point.y);
|
||||
for (const [rowIndex, row] of Go.currentGame.board.entries()) {
|
||||
for (const [pointIndex, point] of row.entries()) {
|
||||
const priorColor = point && getColorOnBoardString(priorBoard, point.x, point.y);
|
||||
const currentColor = point?.color;
|
||||
const isPreviousPlayer = currentColor === Go.currentGame.previousPlayer;
|
||||
const isChanged = priorColor !== currentColor;
|
||||
if (priorColor && currentColor && isPreviousPlayer && isChanged) {
|
||||
return [+rowIndexString, +pointIndexString];
|
||||
return [rowIndex, pointIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user