I have made a basic javascript game of blackjack (21) were the page does not refresh/post. I am wanting it to change a entity in a database (money) with out a user being able to easily access the page/method of changing the database. I was thinking about ajax but even this way a user could finde the page and then access the db. Is there a better way of doing this??? Thanks.
2 Answers
See this question for reference:
Preventing cheating for on-line arcade high score board
Blackjack is a simple enough game however where you can simulate every single variable server side, there is no need for client side processing in your case. Move all your code to the server side, feed the result to the client, feed the clients actions back to the server and it will be for all intents and purposes cheat proof.
This way, the client cant send scores/card ID's etc, only their actions stick|split|draw etc.