Stock and Relationships to Deck

Game development with Board Game Arena Studio
Post Reply
User avatar
Samami
Posts: 5
Joined: 26 March 2020, 20:41

Stock and Relationships to Deck

Post by Samami »

Aloha,
I'm having a hard time wrapping my head around stock. I have gone through the Hearts tutorial, and have read the heck out of the documentation, but I don't understand why most examples have stock as "MyHand". Is it because it's JS and front end and each player gets a copy of this?
Deck makes sense to me, I have a deck and it puts things in different places, and I want stock to be the same and it doesn't seem to be.
What am I missing?
Specifically I have a game where the cards go in the middle of the table, then players can take that card or pass. In my head, the stock is just a single deck of cards, not one for each of the players.
Mahalo,
Sam
User avatar
DrKarotte
Posts: 279
Joined: 22 September 2015, 23:42

Re: Stock and Relationships to Deck

Post by DrKarotte »

Stock simply offers some functions to display elements of a kind on client side, order them by value, move them from one stock to another. The deck a structure with helping functions like moving cards, shuffling on server side, connected to a database.
Post Reply

Return to “Developers”