Frage

i working on simple html5 slot machine , now im looking for away to prevent user bad behavior like be man in the middle and send bad requests to the server and get point which cheating . what is the best way to implement fraud mechanism on such game ?

War es hilfreich?

Lösung

You should be making the slot decision on the server, and then just displaying it to the user.

Potential solution: When the user presses "Spin" send a request to the server which could then send back X random numbers between 0 and Y, where X is the number of items in your slot machine and Y is the number of choices per slot. You would also send back a "win" boolean. Then all you have to do is display the slots that correspond to the numbers and tell them if they won/lost based on the boolean.

All the initial "spin" request would be sending is something that says a user wants to spin the slot machine, but nothing about whether or not they won or lost.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top