NillionNetwork/nada-by-example

Price is right game

开放

#10 创建于 2024年8月13日

 (3 条评论) (0 个反应) (0 位负责人)Python (10 个派生)auto 404
enhancementgood first issuehacktoberfesthelp wanted

仓库指标

星标
 (11 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南