News:

SMF - Just Installed!



"Crown" Logic

Previous topic - Next topic

Witherweaver

Quote from: yed on 06 January 2017, 04:56:59 PM
Quote from: Watno on 06 January 2017, 01:30:00 PM
Quote from: AdamH on 06 January 2017, 01:00:45 PM
OK I completely agree with you. I just think that there are no edge cases for Crown that can't be solved by "the next card you click should be doubled whether it's an Action or a Treasure"


the edge case is +card token on Crown. You have to decide before you see what you draw.

(Not disagreeing with the fact that the current way it is handled is not ideal)

I agree with Adam, that if there is no +card token on Crown, the interface could "transfer" the crown action to the buy phase (it would need to increase the action counter).

Such things are potentially problematic, though.  Imagine this discussion before Adventures (I mean, if Empires was out and Adventures was not).  We'd all just say that the interface should move you to Buy phase.  Then with +Card token, the developer has to keep this interaction in mind and go back and change the behavior of this specific card (Crown), and may not realize to do so.

Though I think I'd agree, these 'shortcuts' make the interface better.  But form a maintenance point of view, new Cards could introduce unseen bugs.

Polk5440

I have mentioned this in another thread earlier in the beta, but I think this problem with Crown highlights an additional problem that it's not always clear when you are in the Action phase and when you are in the Buy phase and when you are in the Cleanup phase. This can be solved with some modifications to the UI.

This problem with Crown is also slightly at odds with the very careful implementation of trashing, discarding, etc., so it's not clear why there shouldn't be an extra confirmation to play Crown as an Action when there are no other actions to double.

(I agree with Adam that my preferred method to solving the Crown issue is to double the treasure if it's the next card played except in the token edge case.)

AdamH

Quote from: Witherweaver on 06 January 2017, 05:05:25 PM
Imagine this discussion before Adventures (I mean, if Empires was out and Adventures was not).  We'd all just say that the interface should move you to Buy phase.  Then with +Card token, the developer has to keep this interaction in mind and go back and change the behavior of this specific card (Crown), and may not realize to do so.

Though I think I'd agree, these 'shortcuts' make the interface better.  But form a maintenance point of view, new Cards could introduce unseen bugs.

This same issue happened with Peddler in the kingdom and if you had no treasures in hand, but you had Actions that you didn't want to play. At the time, the "Play All Treasures" button doubled as the "End Actions" button so you needed a way to tell the client that you were ready to move to the Buy Phase so it could reduce the cost of Peddler for you.

There was a special case written in the code that put up a button that said "buy phase" in Peddler games. It solved the problem. When future expansions were released, the overall interface might have changed to accommodate newer cards, but that was a problem for that time.

My point is, the UI of the product is best when you just recognize that the +1 Card token being on Crown means you need to interrupt the user and ask them if they're playing their Crown as an Action or a Treasure if they have no more Actions in hand. If something else comes along, yeah they'll have to update it but like, it seems really silly to make the product worse to account for edge cases that come from future cards that may never exist.

Otherwise you can just tell what the user wanted to do by looking at the next non-Crown card they click on with no issues. I struggle to see any argument that this isn't the best interface.

Witherweaver

Yeah, I agree with you.

Ingix

Quote from: AdamH on 06 January 2017, 01:00:45 PM
OK I completely agree with you. I just think that there are no edge cases for Crown that can't be solved by "the next card you click should be doubled whether it's an Action or a Treasure"

...I have not gone through every single interaction though, so maybe I'm missing something.

Quote from: Ingix on 06 January 2017, 07:28:29 AM
What I am objecting to is that we should not starting going down that path were we need the computer to understand more and more *complicated* situations in order to provide the shortcut for the player to simply press the "End actions" button in this case.

Why not? The choice here is that either two people write some extra lines of code, or their product is worse. I think the product should be as good as possible.

In Principle:
Sometimes a consistent "game flow" that people can learn and apply is better than little shortcuts that are meant to make the game flow easier in some cases but in the end destroy a players 'confidence' in understanding the game flow when he is confronted with something that doesn't fit his mental model of how the game flow should work (like switching from Action phase to Buy phase after clicking on an Action card (Crown)).

In the current situation:
No code change is "free", it will always replace something else. I think there are still lots of other things that should take precedence.

Donald X.

Quote from: AdamH on 06 January 2017, 10:07:35 PM
Otherwise you can just tell what the user wanted to do by looking at the next non-Crown card they click on with no issues. I struggle to see any argument that this isn't the best interface.
That sounds bad to me. Just, unlikely to handle everything.

I playtested a card for Adventures that was a duration attack that made other players discard down to 3 at the start of their buy phase. If the program figured out what phase it was after seeing what you Crowned, and it was your Buy phase, it would then need to make you pick the Crown and other card back up so you could discard.

If you try to play Crown in your main phase with no Actions in hand, there could be an "are you sure." And there has to be a way to jump to the Buy phase, like that Peddler example. I think though that we have to know what phase it is before arriving at the middle of resolving Crown.

LastFootnote

I'll cast my vote for an "are you sure" warning. Retroactively moving you to your Buy phase in the middle of resolving a card is asking for trouble.

AdamH

Quote from: Donald X. on 09 January 2017, 12:21:47 AM
Quote from: AdamH on 06 January 2017, 10:07:35 PM
Otherwise you can just tell what the user wanted to do by looking at the next non-Crown card they click on with no issues. I struggle to see any argument that this isn't the best interface.
That sounds bad to me. Just, unlikely to handle everything.

But, but... it does handle everything. Except for one thing, where you prompt the user instead.

There is one interface that works for all existing cards and is the most intuitive thing for new players (it's actually the most intuitive thing for all players). It requires one special-case for when there's a +Card token on the Crown pile, but other than that it works for every Dominion card that's currently published.

Then there's another interface that requires an "are you sure?" prompt that is going to be super-confusing for new players (actually it will be confusing for everyone who sees it for the first time). It's there to handle an edge case that isn't there for 99% of cases and can easily be special-cased in the code. And the justification for making the interface worse by not special-casing it is that maybe more cards will be published to make it matter?

This is very clearly not the best solution to me. Quality of the current product and intuitive controls are the most important thing: there is a solution that works for all of the published cards and can easily be special-cased for when it needs to matter (and I can think of lots of ways where it's easy to extend well-written code for this to account for future cards). I just don't see why we aren't using it.

Better than the "are you sure?" button would be a prompt that comes up once you click on Crown that says "play as Action" or "play as Treasure", then the user clicks that -- this lines up more directly with what appears on the text of the card, and also more gracefully handles the situation where you have Actions in hand but you don't want to play them. Then, you're going to want the software to try and figure out when there is no choice (like if we found it with a Herald or Venture or something) and not prompt the user. OK, this is already messier code than my suggestion...

But then people are going to ask why they are pressing a button when they're giving that information anyways by clicking the next card they want to play. And now we're back to what I've suggested the interface should be, which means we only see the prompt when the +1 Card token is on the Crown pile.

Witherweaver

Isn't Enchantress a counterexample too?

If my opponent played Enchantress and I have Crown + 4 Treasure in Hand, and I play the Crown, it can't assume it's my buy phase, and it can't deduce from what I play next.

Donald X.

Quote from: AdamH on 09 January 2017, 01:46:34 PM
But, but... it does handle everything. Except for one thing, where you prompt the user instead.
You are not going to convince me here.

If you are willing to have special-cases that ignore the rules for one situation, then you will be willing to have those for multiple situations. If you have them for multiple situations then you will get weird bugs that you could have trivially avoided by not ever ignoring the rules.

The idea of starting to resolve a card without knowing what phase it is is Bad.

Note that this is not the case with e.g. playing Counterfeit and having isotropic realize "oh you want it to be your Buy phase now." That goes, make it your Buy phase, then play Counterfeit. The Counterfeit is played full-on in your Buy phase.

When you have a game that only has 10 cards set in stone and is never getting any more, you have the freedom to write code that is very specific to how the cards work, that would mess up if they were different. We have a game with lots of cards and the ability of some cards to change what other cards do. Ignoring the rules, trying to spot the problem interactions that result and then special-casing them is awful. Having the philosophy that that's okay sets you up to have a bug-riddled program. I believe this strongly! Argument by authority, many years as a computer programmer.

Polk5440

Quote from: Donald X. on 09 January 2017, 03:41:28 PM
The idea of starting to resolve a card without knowing what phase it is is Bad.

This is what I was trying to get across. Thanks for saying it better.

AdamH

Quote from: Witherweaver on 09 January 2017, 03:26:49 PM
Isn't Enchantress a counterexample too?

If my opponent played Enchantress and I have Crown + 4 Treasure in Hand, and I play the Crown, it can't assume it's my buy phase, and it can't deduce from what I play next.

In this case, even if we're in the Buy phase, we still get +1 Card and +1 Action when we play our Crown. I assume it's strictly better to play it in your Action phase because then you get the option of playing Action cards afterward should you draw one.

Quote from: Donald X. on 09 January 2017, 03:41:28 PM
Quote from: AdamH on 09 January 2017, 01:46:34 PM
But, but... it does handle everything. Except for one thing, where you prompt the user instead.
You are not going to convince me here.

If you are willing to have special-cases that ignore the rules for one situation, then you will be willing to have those for multiple situations. If you have them for multiple situations then you will get weird bugs that you could have trivially avoided by not ever ignoring the rules.

The idea of starting to resolve a card without knowing what phase it is is Bad.

[...]

I believe this strongly! Argument by authority, many years as a computer programmer.

You are not going to convince me here, either. I have spent several years as a computer programmer as well. Many times I've done something that was slightly inconvenient and was great software design only to have my customers come back and tell me they wished it was a different way. They didn't care about the design or rules I followed, they cared what their product did and that it made sense to use.

I am not suggesting that they break this rule you just made up for every single card where they can. I'm suggesting that in this one case, we can come up with an exhaustive list of all of the places where it matters, easily detect when that is the case, and for the other 99+% of cases, it doesn't matter that we break this rule. The result is a much better user interface and a better product.

What's going on here is not "the idea of starting to resolve a card without knowing what phase you're in" -- it's the user saying they want to play a Crown, then with the next click telling you how they want to do so (which will tell you what phase they wanted). In all of the cases where this is OK (everything except for +1 Card token on Crown pile) we don't have to actually resolve the card until that second click.

And I am not suggesting that the gears and levers behind the screen have to even start actually resolving the card until that happens. Yeah maybe the first Crown you played will appear in the play area after the first click so things are clear, but that's about it. Will this make everyone feel better?

Witherweaver

Quote from: AdamH on 09 January 2017, 06:31:33 PM
Quote from: Witherweaver on 09 January 2017, 03:26:49 PM
Isn't Enchantress a counterexample too?

If my opponent played Enchantress and I have Crown + 4 Treasure in Hand, and I play the Crown, it can't assume it's my buy phase, and it can't deduce from what I play next.

In this case, even if we're in the Buy phase, we still get +1 Card and +1 Action when we play our Crown. I assume it's strictly better to play it in your Action phase because then you get the option of playing Action cards afterward should you draw one.

Of course, but my point is that if you play it in your Buy phase, you can't play an Action if you draw it.  It is strictly better, yes, but I'm not so sure we should have our implementation optimizing our choices.

AdamH

Well if it was me, I wouldn't want the UI bothering me, asking me if I wanted to make a suboptimal choice. But this kind of thing could easily be added to the list of exceptions (doubling its size!) if that's what was determined to be correct.

But that's a design decision I don't feel like I'm qualified to speak towards. Unlike the rest of the stuff I've said in this thread, which I feel strongly enough about to stand behind.

Witherweaver

And actually, the more I think about it, the current implementation is natural.

You have an Action in your hand, regardless of whether its art and border look treasurelike or not.  As long as I have the choice to do things in my Action phase, I should explicitly tell the interface to move to my Buy phase somehow. 

Before Peddler, Tokens, Enchantress, etc., if you start a turn with a hand of Throne Room, Copperx4, the same argument would say that the game should assume it's your Buy phase.