thomasbigger584 / poker-app

2 stars 1 forks source link

Persist funds #114

Open thomasbigger584 opened 9 months ago

thomasbigger584 commented 9 months ago

Currently when a player connects to a table, they are given a fixed number of funds

we want to be able to store their funds against the user and use their previously saved funds in the game instead.

THINK ABOUT: on connecting to the table, the funds should deduct from their bank and add to session, and on disconnect from the table, any remainder funds on session should be added back to bank (reason i dont like this is that there is too much movement of data and a little bit of redundancy unnecessarily - but it feels closer to real life - someone invests in the game so money is deducted from their bank)

thomasbigger584 commented 9 months ago

https://github.com/thomasbigger584/poker-app/blob/master/api/src/main/java/com/twb/pokerapp/service/PlayerSessionService.java#L48