A
Anonymous

Affari Tuoi Calculator - Copy this React, Tailwind Component to your project

Generate a web page that calculates statistics for the Italian game show 'Affari Tuoi' (Rai Uno). The page should allow users to input the number of boxes remaining, the value of each remaining prize, and simulate possible outcomes based on the following rules: Game Overview: There are 20 boxes at the start, each containing a different cash prize. The player selects one box at the beginning and can open the remaining boxes one by one, revealing their contents. The host periodically offers a deal based on the remaining prizes. The game ends when the player either accepts a deal or decides to open their chosen box. Features: Display a list of all remaining prizes. Calculate the average value of remaining prizes. Calculate the probability of the player winning each remaining prize (after a specific number of boxes have been opened). Allow the user to simulate the outcome if they accept the deal or continue opening boxes. Display a chart that shows the expected value of the remaining prizes at each stage of the game. Provide an option to calculate the risk of continuing (probability of receiving a lower prize than the offer). Show the maximum prize still available and the median prize among the remaining ones. The page should be styled using basic CSS and should be responsive on both desktop and mobile. Inputs: Number of boxes remaining. Values of the remaining prizes. Current deal offered by the host (optional). Outputs: Probability distribution of winning each prize. The average remaining prize value. Expected value of continuing the game vs. taking the deal. Visualization of the prize distribution and expected values over the course of the game. The page should allow the user to play through different scenarios and view their odds of winning each prize as the game progresses. Provide clear, well structured code with comments for each section.

Prompt
Component Preview

About

AffariTuoiCalculator - Calculate odds for the Italian game show with prize stats, risk analysis, and visualizations. Built with React. Get component free!

Share

Last updated 1 month ago