I’m working on an online blackjack game to be implemented with python websockets. Player 1 and 2, both human, will interact with the server through two client instances I’m planning to make with textual which make it an online terminal based game.
What I’m trying to find out is how to show Player 1 and 2 games independently. That means Player 1 should see his own cards even the covered one and Player 2 uncovered cards only. The same applies for Player 2.
Example
Player 1
My game: A, 2, 3, 4
P2 game: [covered], 5, 6,7
Player 2
My game: J, 5, 6, 7
P1 game: [covered], 2, 3, 4
I’ve done some research on this topic but all results use one UI content that is shared between players. That’s basically the same approach the official tutorial has but I’ve not found anything that can expand my idea of using urls that work like a REST API that I can use to send dedicated content to players.
Is there a way to implement a system that uses urls like ws://localhost:8001/player_one and ws://localhost:8001/player_two for this purpose?
Is there any other approach to do this?