Why don´t you take a look a the diagrams on this white paper and search open source projects with keywords "provably fair betting".
Hello, could you provide me a example on how a smart contract could help me?
The project is not about betting it's more like:
Game checkers:
Player A put's 10$ in the room
Player B put's 10$ in the room
If a wins he get's all what's in the room, if not B gets all.
It's not a betting site, so how could help me this?
A contract is just auto executing code based on input, but depending on how you do this I don't think you need a contract, while I'm not an expert, the idea is simple.
When a game starts, you tell Player A and Player B to deposit to the contract, maybe they input their adress on their site, the contract receives the money and ties the adress to the player(if no 'active adress', contract sends it back instantly).
If not both deposits are received within 10 minutes, cancel all deposits and refund any payments from the two active adresses(Player A and Player B, incase one of them didn't deposit, the other one gets his money back).
Otherwise, the game starts, and once your site determines who wins, you simply tell the contract to either send money to player A or to player B, since you now have their money in 'escrow' (the contract), and you have both their adresses saved in your website, so you can tell the contract that the winner was adress A and therefore he'll get $20 (amount could be tied to the adress in your database aswell).
I don't know, again not an expert but it definitely sounds like a case for a smartcontract