Hanabi-Live / hanabi-live

A web server that allows people to play Hanab, a cooperative card game of logic and reasoning.
https://hanab.live
GNU General Public License v3.0
177 stars 114 forks source link

In-game hypo inconsistent unknown cards. #1917

Open timotree3 opened 3 years ago

timotree3 commented 3 years ago

Screenshot from 2020-11-29 13-28-16

  1. See a drawn card in the present game
  2. Enter replay and rewind to the first turn
  3. Enter in-game hypo
    • Any drawn card that you've seen in the present game will have the "blank" back
    • Any card that you haven't seen in the present game will have the "unknown/empathy" back.

This does not seem good.

Ideas:

Zamiell commented 3 years ago

in my mind, the behavior should be to only show the blank back for hypothetical cards, not real cards

meaning that:

(pseudocode)
const orderOfLastDrawnCard = ?; // Derived from globals.state.ongoingGame
if (card.order > orderOfLastDrawnCard) {
  // Show blank card back
} else {
  // Show normal, fully revealed card back
}
timotree3 commented 3 years ago

what does last drawn card mean? last drawn card on the turn where the hypothetical started? or last drawn card in the present?

Zamiell commented 3 years ago
const orderOfLastDrawnCard = ?; // Derived from globals.state.ongoingGame

meaning the last drawn card in the present, because globals.state.ongoingGame is the present GameState

timotree3 commented 3 years ago

Well then that's already whats happening

Zamiell commented 3 years ago

no it isn't, what is currently happening is

(pseudocode)
const orderOfLastDrawnCard = ?; // Derived from globals.state.replay.states[turnHypoStarted]
if (card.order > orderOfLastDrawnCard) {
  // Show blank card back
} else {
  // Show normal, fully revealed card back
}
Zamiell commented 3 years ago

the "Derived from" part is different in the two code snippets

timotree3 commented 3 years ago

Read the original post again. I think you've got it wrong.

  • Any drawn card that you've seen in the present game will have the "blank" back
  • Any card that you haven't seen in the present game will have the "unknown/empathy" back.

This is what's currently happening as decribed in the OP and this is the same as your "proposal" with ongoingGame

Zamiell commented 3 years ago

oh i see

Zamiell commented 3 years ago

your screenshot isn't very good, here's a better one that showcases the bug: image slot 1 is not known in the present slot 2 is known in the present

Zamiell commented 3 years ago

in "Hide Drawn Cards Mode" (the defualt):

in "Show Drawn Cards" mode:

Zamiell commented 3 years ago

can we write tests for this? probably not?

padiwik commented 3 years ago

So it's not really "drawn cards", but a new thing like "Show cards in hand"? And then shared replay hypo will need toggle buttons for both of these features to avoid conflating them?

Zamiell commented 3 years ago

So it's not really "drawn cards", but a new thing like "Show cards in hand"?

right but you just combine those two things because we don't want to have a separate button for just that imo