44 lines
1.5 KiB
HTML
44 lines
1.5 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Rock Paper Scissors Card Game</title>
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://pyscript.net/releases/2025.3.1/core.css"
|
|
/>
|
|
<script
|
|
type="module"
|
|
src="https://pyscript.net/releases/2025.3.1/core.js"
|
|
></script>
|
|
</head>
|
|
<body>
|
|
<h1>Rock Paper Scissors Card Game</h1>
|
|
<p>
|
|
Play Rock Paper Scissors with a twist! Use a 52-card deck with an
|
|
uneven distribution of cards. Both you and the AI get three cards,
|
|
and the AI selects randomly. The rules follow the classic game, but
|
|
with an added element of chance!
|
|
</p>
|
|
<p>Select a card to play against the AI! Best out of 5 game mode.</p>
|
|
|
|
<h3>Score</h3>
|
|
<p>
|
|
You: <span id="user-score">0</span> - AI:
|
|
<span id="ai-score">0</span>
|
|
</p>
|
|
|
|
<h3 id="result">Waiting for your move...</h3>
|
|
|
|
<div id="card-buttons">
|
|
<button id="card-0" index="0" py-click="game.play_card">?</button>
|
|
<button id="card-1" index="1" py-click="game.play_card">?</button>
|
|
<button id="card-2" index="2" py-click="game.play_card">?</button>
|
|
</div>
|
|
<p></p>
|
|
<button id="reset-game" py-click="game.reset_game">Reset Game</button>
|
|
|
|
<script type="py" src="./main.py"></script>
|
|
</body>
|
|
</html>
|