Giter Club home page Giter Club logo

0xgeegz / lets-fucking-game-v1 Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 1.0 63.6 MB

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.

Home Page: https://lfgames.xyz

Shell 0.13% TypeScript 95.79% JavaScript 0.72% Dockerfile 0.01% Solidity 3.35% HTML 0.01%
chainlink emotion eslint etherjs hardhat javascript keeper mythril nextjs prettier slither solhint solidity solidity-coverage typechain typescript wagmi

lets-fucking-game-v1's People

Contributors

0xgeegz avatar alesandar avatar boukorrasluc avatar damien-castello avatar danielgruesso avatar dependabot[bot] avatar imollov avatar ivaylonikolov7 avatar mradkov avatar paradoux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

panoptisdev

lets-fucking-game-v1's Issues

Game Implementation > Smart Contract vars refacto

Create a Struct called Game that will contains :

  • bytes public encodedCron;
  • uint256 public registrationAmount;
  • uint256 public houseEdge;
  • uint256 public creatorEdge;
  • uint256 public gameId;
  • 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);

[0.1] Game Factory > Game Creation Limitation

For games where the player must bet to register, make sure that only one player can create a game for the following list of amounts :

  • 0.1
  • 0.25
  • 0.50
  • 0.75
  • 1
  • 1.5
  • 2
  • 5
  • 10

The list should be stored onChain and modifiable via a setter in the Smart contract.

No other amounts are allowed.

[OPTIONNAL] Each game created will have an NFT which will identify the owner of the game (who will receive a fraction of the game's profits)

[0.1] Game Implementation > Split Pot

Allow voting to split the remaining money between the remaining players (from less than 50% of players remaining)

Create some test cases to be sure that this feature is stable.

[0.1] Game Implementation > Deposit Prizepool on Creation V1

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)
  • In NFT (ERC 721)
  • In NFT (ERC 1155)

[0.1] Game Factory > Keeper Refacto

Keeper will be associated with the factory in order to manage all games.

This will allow us to control the keeper and ensure that it will not get out of LINK.

Implement the AutomationCompatible interface of chainlink to facilitate communication between contracts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.