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

Homeworld persists without ships when skipping out-of-time opponent #15

Closed
SimonN opened this issue Nov 10, 2022 · 6 comments
Closed

Homeworld persists without ships when skipping out-of-time opponent #15

SimonN opened this issue Nov 10, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@SimonN
Copy link

SimonN commented Nov 10, 2022

See screenshot below.

This is a tournament game. Opponent (anonymized in screenshot) is out of time, I still have time. I pressed the button to skip his turns.

(Background: I expected to call the flag. BGA doesn't support the classical flagging from two-player tournaments. Instead, BGA allows to skip turns. This merely displays that I will win and he will lose. The match continues.)

To show that the position is indeed a win for me against him passing forever, I caused a fleet catastrophe at his homeworld, then ended the turn. This is already committed to the log at the right, see cyan box in the screenshot. I did not forget to end the game-winning turn, which would be the usual catch here.

Expected: Opponent's shipless homeworld fades at end of my turn.
Observed: Opponent's shipless homeworld persists after the end of my turn and also after the end of his skipped turn.

Should I press the blue Quit button at the top of the screenshot?

Did I need to show at all that I have sufficient material to force a win against passing?

Game is still running; I'll email you the table number.

flagged-opponent-does-not-lose

@jpeterbaker jpeterbaker added the bug Something isn't working label Nov 10, 2022
@jpeterbaker
Copy link
Owner

The homeworld remaining in place is expected in the current version. For better or worse, I didn't bother to make homeworld systems fade since that should only happen at the end of a game. (Of course I'll change that if I get around to multiplayer versions.)
What I didn't know is that the game can continue with an empty homeworld if that player is out of time, but I think I know what the problem is (the code needs to be more careful about distinguishing between "zombie" status and "eliminated"). I don't get lots of debugging time these days, but this is top priority now.

Workaround: Claim your victory by hitting the "quit" button.

@SimonN
Copy link
Author

SimonN commented Nov 10, 2022

Thanks for the quick reply! I pressed Quit, and BGA recorded it as a tournament win. Log says: "All players with a positive clock chose to abandon the game." That resolves my immediate concern.

It's still sensible to fix homeworld fading and automatic ending of the match. You already know the endgame oddity thread on BGG that is concerned with starless homeworlds and with shipless homeworlds.

Homeworlds doesn't have rock-solid written rules to answer all the oddities directly. We have to guess something and see if it matches the rules as written. If I'd have to define it myself: Every homeworlds turn (beyond the round where we found the homeworlds) consists of

  1. Sacrifice phase. Bean counters might allow to call catastrophe here even before the sacrifice, but merely to satisfy the rules' "at any time in your turn". In practice, we should get the same board state if we call catastrophe at the start of the action phase before we conduct actions.
  2. Action phase. Call catastrophes before, in between, or after your 0, 1, 2, or 3 actions.
  3. Elimination phase. You cannot call catastrophe in this phase, and nobody makes decisions.

Ships without stars (at homeworlds or at basic stars) are immediately destroyed in any phase. Basic stars without ships immediately fade.

My Elimination phase consists of the following substeps, in this exact order:
3a. Fade shipless homeworlds.
3b. Eliminate players that own no ships at their homeworld, or whose homeworld faded.
3c. Check for victory or draw, purely based on who is eliminated.

If we wish homeworlds of eliminated players to become basic systems in multiplayer -- to be clarified, see #16 (comment) --, the Elimination phase should instead have these substeps, in this exact order. This applies both to two-player and to multiplayer Homeworlds.

  1. Eliminate all players whose homeworld has been destroyed this turn, or whose homeworld still exists but who have no own ships at their homeworld.
  2. Homeworlds belonging to eliminated players lose homeworld status. They are now basic systems, possibly even with a binary star. If there are no ships here, they fade immediately.
  3. Reveal good/evil roles according to ruleset.
  4. Check for victory or draw, purely based on who is elimiated and good/evil roles.

What's the difference between a zombie and an eliminated player? Is that BGA implementation jargon? Or are there two such different states even in offline Homeworlds with physical pieces (two-player or multiplayer)?

@jpeterbaker
Copy link
Owner

"Zombie" is a BGA term for a player who has been dropped or eliminated by the rules. I understand how it works better now, and I think I can fix it without too much trouble.

@jpeterbaker
Copy link
Owner

I think I have this fixed, but I'd like to do some more testing before deploying it on BGA.

@jpeterbaker
Copy link
Owner

I believe this is now fixed. Let me know if you have trouble again.

@SimonN
Copy link
Author

SimonN commented Nov 22, 2022

Thanks! Yes, I'll let you know whenever I see it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants