Part 4.4: Build the "Choice" React Component
Describe the Prisoner's Dilemma in Text
return (
<div>
<h2>π You and your partner in crime have been arrested! π</h2>
<ul className="list-disc list-inside">
<li>
If you both π€π€ keep silent, you will both get
<strong>2 months</strong> in jail.
</li>
<li>
If you π£ testify against your partner and he π€ keeps silent,
<strong>you will only spend 1 month in jail</strong>.
</li>
<li>
If you π€ keep silent, but your partner π£ testifies, you get
<strong>12 months</strong> in jail.
</li>
<li>
If you both π£π£ testify, you both get <strong>6 months</strong> in
jail.
</li>
</ul>
<br />
<p>What do you do?</p>
</div>
);
Add buttons for each option
Handle the button clicks

Save the response
Submit the stage

Last updated
Was this helpful?