Let's Fucking Game allows you to create "One Button Game" to engage your community and provide them fun way to engage with your content. Once the game starts. players have to log in everyday during a random time slot. If you forget, you lose. The last players share the prizes according to the prizepool distribution.
uint256 public roundId; // This gets incremented every time the game restarts
string public gameName;
string public gameImage;
uint256 public gameImplementationVersion;
uint256 public roundLength; // Time length of a round in hours
uint256 public maxPlayers;
uint256 public numPlayers;
bool public gameInProgress; // Helps the keeper determine if a game has started or if we need to start it
address[] public playerAddresses;
mapping(address => Player) public players;
mapping(uint256 => Winner) public gameWinners;
Delare a new variable in smart contract :
Game public game:
Then replace access to data that now in the struct Game like that : houseEdge = initialization._houseEdge; => **game**.houseEdge = initialization._houseEdge;
Then replace the getStatus function return values by the struct Game like it is done here : function getPlayer(address player) external view returns (Player memory);
A player can create a game and deposit the prize pool himself. This game is then considered as a one shot game and will not automatically restart at the end.
The game will therefore be accessible for free.
The prize pool can be deposited :
In the currency of the blockchain (Exemple : BNB on BNB Chain)