I am new to solidity and I am trying to implement a simple game involving two players each challenging the other to guess an n-letters word. The winner is the one that guesses the maximum number of letters correctly. Before the game starts each player submits a bid. The winner gets the total amount. Any suggestions on how to approach this scenario? Anyone aware of an existing contract that does something similar so that I can use it to learn from? Thanks for your help!
The biggest problem you will face with this idea is keeping the word secret. There are no secrets in the blockchain - everything is visible to anyone who knows how to look.
You would need some logic also outside blockchain to for example encrypt the word before sending it to the contract. You can't have the encryption keys inside the contract either as everything is public. And if you have logic and functionality outside blockchain, then is it worth it to make anything inside the blockchain?