Two players card game

I need to implement a card game between two players. A player clicks "bet" button, then a game appears in queue list and another player clicks "join" button, and then the game starts. Technologies I use include Rails 4, websocket-rails, jQuery. What I'm confused about is how to show each player their own cards and to not show the opponent's cards on the board. What technique is being used for this purpose? I think I should use internal websocket-rails' connection_store method to store players' cards, but I'm not sure how to work with it later in game and how to store each player's cards in variables

Has anybody here have this kind of experience with websocket-rails? Any advice? May be there is implemented card game on rails somewhere, some code of which I could borrow?

Sounds like a complicated (but cool!) project.

Maybe you should build a small prototype with just some of the basics of websocket-rails so you understand how some of the client-side vs. storage-side concerns are handled.

Or, if you have questions specific to that gem, post them to the Gem page.

I think your question is so broad and at the same time somewhat vague that what you're really asking is how to architect the app.

Thank you for responding. Since the time I asked the question I learned some stuff by myself and wrote a gomoku game :slight_smile: but it doesn't work as expected, namely throws an error. I made another thread about it