Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liqMix/DPlay
A small betting game for the Dfinity Internet Computer Platform
https://github.com/liqMix/DPlay
Last synced: 3 months ago
JSON representation
A small betting game for the Dfinity Internet Computer Platform
- Host: GitHub
- URL: https://github.com/liqMix/DPlay
- Owner: liqMix
- Created: 2021-05-09T06:11:52.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-12T04:37:09.000Z (over 3 years ago)
- Last Synced: 2024-06-21T18:10:31.297Z (5 months ago)
- Language: JavaScript
- Size: 40 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-icp - liqMix/DPlay
README
# DPlay
This is a small project to explore Dfinity platform, DFX, and the Mokoto language.The goal is to provide a simple game between two players, and allowing both players to wager identical amounts on the outcome. The game is a simple one-dimensional euclidean distance from a random number. IE: A random number is generated between a given range and is considered the target. Each player must then guess a number. Whoever has the closest number to the target wins both the wagers. A tie refunds the wagers to the players
Each game begins a request from one player to another. The request consists of simply the player name, the wager amount, and a hidden guess. Once received, a player will be able to respond to the request with their own guess, and spends the same amount as the first requester's wager. Once both wagers and guesses are recieved, the winner is decided, paid, and the match history for both players is updated. If the player does not want to wager the same amount, they may decline the request.
Only one game between two unique players is allowed at a time.
# Current Features
- New Player Creation
- User Player Retrieval# Future Features
- The Actual Game Part
- Current Requests
- Match History# Build
- Install DFX v0.7.0-beta.6 `DFX_VERSION=0.7.0-beta.6 -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"`
- Install node
- Clone the repo
- Run `dfx start` in one console window to start the local dpx service
- Run `npm install` to install the node dependencies
- Run `dfx deploy` to deploy the canisters
- Wait
- View page at `http://127.0.0.1:8000/?canisterId=[CANISTER-ID]` using `www` canister ID# DFX Intro
Welcome to your new DPlay project and to the internet computer development community. By default, creating a new project adds this README and some template files to your project directory. You can edit these template files to customize your project and to include your own code to speed up the development cycle.To get started, you might want to explore the project directory structure and the default configuration file. Working with this project in your development environment will not affect any production deployment or identity tokens.
To learn more before you start working with DPlay, see the following documentation available online:
- [Quick Start](https://sdk.dfinity.org/docs/quickstart/quickstart-intro.html)
- [SDK Developer Tools](https://sdk.dfinity.org/docs/developers-guide/sdk-guide.html)
- [Motoko Programming Language Guide](https://sdk.dfinity.org/docs/language-guide/motoko.html)
- [Motoko Language Quick Reference](https://sdk.dfinity.org/docs/language-guide/language-manual.html)