Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(examples): Implement a two-player Dice Roller game #2768

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

linhpn99
Copy link
Contributor

@linhpn99 linhpn99 commented Sep 8, 2024

Description:

This PR introduces a basic dice rolling game : Dice Roller

Game Rules:

  1. Two players each roll a dice once
  2. Each roll results in a value between 1 and 6
  3. The player with the highest score will win the game
  4. If both players roll the same value, the game is a draw
  5. No points or stats changes are awarded if you play against yourself

Purpose:

  • This package serves to illustrate the application of on-chain randomness using Gno's p/demo/entropy and rand/math packages. While these packages provide randomness, they are not entirely unpredictable, and their usage in this game is intended to showcase their practical implementation in Gno's realms
  • Designed with a minimalistic realm to ensure ease of understanding and accessibility for newcomers to Gno realm development

Screenshot from 2024-09-10 21-56-59

You guys can test this game at : https://test4.gno.land/r/g1w6886hdj2tet0seyw6kn8fl92sx06prgd9w9j8/game/v3/diceroller

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@github-actions github-actions bot added 🧾 package/realm Tag used for new Realms or Packages. 📦 🌐 tendermint v2 Issues or PRs tm2 related labels Sep 8, 2024
Copy link

codecov bot commented Sep 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.44%. Comparing base (f04ec89) to head (5b7d632).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2768   +/-   ##
=======================================
  Coverage   60.44%   60.44%           
=======================================
  Files         563      563           
  Lines       75159    75159           
=======================================
+ Hits        45427    45432    +5     
+ Misses      26343    26340    -3     
+ Partials     3389     3387    -2     
Flag Coverage Δ
contribs/gnodev 61.46% <ø> (ø)
contribs/gnofaucet 15.31% <ø> (ø)
gno.land 67.21% <ø> (ø)
gnovm 64.46% <ø> (ø)
misc/genstd 80.54% <ø> (ø)
misc/logos 19.88% <ø> (ø)
tm2 61.98% <ø> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@linhpn99
Copy link
Contributor Author

@leohhhn cound u take a look

@leohhhn
Copy link
Contributor

leohhhn commented Sep 11, 2024

#2333 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: No status
Status: In Review
Development

Successfully merging this pull request may close these issues.

2 participants