NillionNetwork/nada-by-example

Price is right game

Open

#10 opened on Aug 13, 2024

 (3 comments) (0 reactions) (0 assignees)Python (10 forks)auto 404
enhancementgood first issuehacktoberfesthelp wanted

Repository metrics

Stars
 (11 stars)
PR merge metrics
 (PR metrics pending)

Description

Request a New Nada Example: Price is right game

Description

Create a “Price is Right” style game where multiple parties guess the price of an item, and the winner is the party whose guess is closest to the actual price without exceeding it.

Use Case

This example can be extended to other types of competitive scenarios, such as auctions or bidding systems, making it valuable for developers interested in game theory, competitive pricing models, or privacy-preserving applications.

Specific Requirements

Inputs:

  • The actual price of the item as a SecretInteger
  • The SecretInteger guesses from multiple parties.

Outputs:

  • The guess that is closest to the actual price without exceeding it.
  • The identification of the winning party.

Edge Cases:

  • If all guesses exceed the actual price, the output should indicate that there is no winner.
  • Handle ties where multiple guesses are the closest without exceeding the actual price.
  • Consider cases where multiple guesses are equidistant from the actual price, both above and below.

Contributor guide