Skip to content

Commit

Permalink
Merge pull request #12659 from riverwanderer/12657-Fix-translated-sol…
Browse files Browse the repository at this point in the history
…o-check

Translate current side before checking for "next side".
  • Loading branch information
uckelman authored Sep 11, 2023
2 parents 89758a0 + 056be01 commit cb0337c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ protected String promptForSide() {
// Common names for Solitaire players (Solitaire, Solo, Referee) do not count as "real" player sides, and will be skipped.
// If we have no "next" side available to offer, we stay with the observer side as our default offering.
boolean found = false; // If we find a usable side
final String mySide = getMySide(); // Get our own side, so we can find the "next" one
final String mySide = translateSide(getMySide()); // Get our own side, so we can find the "next" one
final int myidx = (mySide != null) ? sides.indexOf(mySide) : -1; // See if we have a current non-observe side.
int i = (myidx >= 0) ? ((myidx + 1) % sides.size()) : 0; // If we do, start looking in the "next" slot, otherwise start at beginning.
for (int tries = 0; i != myidx && tries < sides.size(); i = (i + 1) % sides.size(), tries++) { // Wrap-around search of sides
Expand Down

0 comments on commit cb0337c

Please sign in to comment.