Hiding cards from players
Posted: 02 January 2021, 17:06
Hi.
I'm a developer of Dungeon Lords and recently went into a problem with cards. In one of the states players are placing their cards with face side down, to hide it from the other players. So in a holder div on player board I have a card div with background-image of card's back side, which will be changed to corresponding face side when the card will be revealed.
And there is a problem, because when you inspect non-revealed yet card you can see in dev mode (F12) id of card, which can give the inspector an information which card is currently chosen before revealing it in a next state.
So I thought of something to hide the information in the dev mode by placing in a holder div an empty div with background-image of the card's back side and then when the card needs to be revealed just take the info from DB and create the card with corresponding bg-image.
Is that the way it should be done here, on BGA? Or you have some better ways to do it?
I'm a developer of Dungeon Lords and recently went into a problem with cards. In one of the states players are placing their cards with face side down, to hide it from the other players. So in a holder div on player board I have a card div with background-image of card's back side, which will be changed to corresponding face side when the card will be revealed.
And there is a problem, because when you inspect non-revealed yet card you can see in dev mode (F12) id of card, which can give the inspector an information which card is currently chosen before revealing it in a next state.
So I thought of something to hide the information in the dev mode by placing in a holder div an empty div with background-image of the card's back side and then when the card needs to be revealed just take the info from DB and create the card with corresponding bg-image.
Is that the way it should be done here, on BGA? Or you have some better ways to do it?