If one of the players is the dealer and deals the cards there is a problem because then the dealer knows the cards of the other players. Because the dealer is also participating in the game. It could be encrypted in some clever multi-party way so that the dealer doesn't know the cards, but then it could also be encrypted in the same way in a client-server scenario, so having a player be the dealer doesn't really achieve anything. There is a good explanation in this video:
https://www.youtube.com/watch?v=mthPiiCS24A
In this scenario all the cards are encrypted with the keys from all the players, so it is only when all players agree that a card can be relieved. This would work in theory, but only as long as the players are fair enough to provide the encryption keys when a card is to be dealt. A player can easily sabotage the game if he has bad cards and doesn't want to play them.
Another possibility would be if the game is actually happening as a smart contract on a blockchain, and the card dealing happens as transactions. This wouldn't really be possible either, because smart contracts are executing far too slow for that.
This is as far as I have gotten in my thinking. I'm sure there is a solution, but I haven't figured it out yet.
https://www.youtube.com/watch?v=mthPiiCS24A
In this scenario all the cards are encrypted with the keys from all the players, so it is only when all players agree that a card can be relieved. This would work in theory, but only as long as the players are fair enough to provide the encryption keys when a card is to be dealt. A player can easily sabotage the game if he has bad cards and doesn't want to play them.
Another possibility would be if the game is actually happening as a smart contract on a blockchain, and the card dealing happens as transactions. This wouldn't really be possible either, because smart contracts are executing far too slow for that.
This is as far as I have gotten in my thinking. I'm sure there is a solution, but I haven't figured it out yet.
In a "heads up" situation it's not an issue because failing to unlock would be considered a fold and the opponent would get the pot. If there are more than 2 players, it can still result in a fold, and then the only advantage in doing that would be that the next hand would start right away thus saving him time. So you can write the app so that doing this would result in a penalty, say, having to sit out x number of hands before he can play again, and also a loss of "karma" and the behavior can even be spelled out in the bio for all to see, thus making it less desirable for people to want to play with him.
A perhaps worse issue would be if a player suddenly loses connection before unlocking.