Nice work, Dexon!
does it matter if I fight the casino or in a casino another player? shouldnt this also be provably fair?
what do I miss here?
The problem with provably fair pvp games, is that they're extremely difficult to actually make provably fair. The way player-vs-house games provably fair works, is the house actually commits to a certain "move" before it could possibly know the players, and then is bound to make that move.
With RPS, the simplest provably fair would be:
Player A makes their move, tells the server the *hash* of their move (obfuscated with a nonce)
Player B makes their move, tells the server the *hash* of their move (obfuscated with a nonce)
Once the server has recorded the hash of both players moves, it then would send it to both players (So they can also check, making it provably fair). Once both players know their opponent hash, they send to the server their own move and nonce (for the server and other player to check).
The flow with this is quite straight forward, except it relies on one thing: If a player can't produce the move (and nonce) that leads the hash, they would need to be forfeited and lose. This might pose a problem with disconnections, and what not. There's a lot of edge cases, and to make it truly provably fair does require a lot of work, and unfortunately a reduced UX [1] due to the whole "lose on disconnection, or failure to produce the result" rule
[1] This could be reduced by having a "trust the server" tick box, which means the client trusts the server and immediately sends the move to the server, that way in the case of disconnect the server would be able to play the move in the persons absence.