-
Notifications
You must be signed in to change notification settings - Fork 293
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
IPVGO: Support scripts playing against each other as each color on "No AI" boards #1917
IPVGO: Support scripts playing against each other as each color on "No AI" boards #1917
Conversation
I look forward to implementing this in my script and so do many other people. |
… controlled territory max space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to take a deeper look at the nextTurn stuff, which is the part with the most magic (always has been).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time I have to review this, I have to pull the full state of how the promise stuff works back into cache. XD I think I almost have a coherent set of suggestions to make, but I'm still ruminating. Pulling everything together into a single update
method is the right plan.
Fixes the issue where handicap stones are added on game load. Better typing for error callbacks. Throw errors instead of deadlocking on bad cheat usage.
This greatly simplifies the code by running everything through handleNextTurn() (formerly makeAIMove()). The nextTurn promises for both sides are handled identically, without special-casing. Even the built-in AI is largely color-agnostic, with only one place that is hardcoded to white.
This tweaked something unstable in Gameboard, the new condition is much more stable for determining when to show the score dialog.
I went through and resolved all the comments I handled in my PR, which was all of them XD |
…inst_other_scripts
…white_against_other_scripts IPVGO: PR on a PR
…s_playing_as_white_against_other_scripts
…white_against_other_scripts Test fixes
…o AI" boards (bitburner-official#1917) This is a big change with a *lot* of moving parts. The largest part of it is enabling scripts to `playAsWhite` as a parameter to many Go functions. In the implementation, this involved a significant rewrite of `opponentNextTurn` promise handling. A number of other changes and bugfixes are included: * Fixes the issue where handicap stones are added on game load. * Better typing for error callbacks. * Throw errors instead of deadlocking on bad cheat usage. * Return always-resolved gameOver promise after game end * Added a new `resetStats` api function. --------- Co-authored-by: David Walker <[email protected]>
Branch testable here: https://ficocelliguy.github.io/bitburner-src/
A few people in discord have asked for the ability to pit multiple IPvGO scripts against each other. This is the most recent:
https://discord.com/channels/415207508303544321/1221920484111814828/1330501717674168423
This PR adds support for making moves as the white player via the API. This can only be done on the "No AI" practice board, which gives no stats. To do this, additional promise handling was added so that the two scripts could listen for when the other script (or player via UI) has made a move.
In addition, documentation improvements and a new Go.analytics.getHistory() method were added to resolve this feedback:
Closes #1576