Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CODEBASE: Fix lint errors 4 #1773

Conversation

catloversg
Copy link
Contributor

This is a part of the series of PRs for #1730. The code in this PR is contributed by @ficocelliguy. Thank you.

I rebased catloversg#2 to dev. While doing that, there is a small conflict:
ficocelliguy's code:

if (currentGame.previousPlayer === GoColor.black && currentGame.ai !== GoOpponent.none) {
  makeAIMove(currentGame).catch((e) => showError(`Error while making first IPvGO AI move: ${e}`));
}

I changed it to:

if (currentGame.previousPlayer === GoColor.black && currentGame.ai !== GoOpponent.none) {
  makeAIMove(currentGame).catch((error) => {
    showError(new Error(`Error while making first IPvGO AI move: ${error}`, { cause: error }));
  });
}

Code of showError:

function showError(error: unknown): boolean {
  console.warn("Encountered the following issue while loading Go savedata:");
  console.error(error);
  console.warn("Savedata:");
  console.error(data);
  return false;
}

@d0sboots d0sboots merged commit 97ca8c5 into bitburner-official:dev Nov 14, 2024
5 checks passed
@catloversg catloversg deleted the pull-request/codebase/fix-lint-errors-4 branch November 14, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants