File size: 1,504 Bytes
933256c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!doctype html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Pennyflip</title>
        <link
            rel="stylesheet"
            href="{{ url_for('static', filename='styles.css') }}"
        />
    </head>
    <body>
        <div id="game-container">
            <div id="info">
                <h2>Pennyflip</h2>
                <p>
                    Balance: $<span id="balance">0.00</span> | Flips left:
                    <span id="flips-left">1000</span>
                </p>
            </div>
            <div id="coin" style="background-color: {{ coins[0].color }}"></div>
            <div id="shop">
                {% for coin in coins %}
                <div
                    class="shop-coin"
                    style="background-color: {{ coin.color }}"
                    onclick="buyCoin({{ loop.index0 }})"
                >
                    <div>P: {{ "%.2f"|format(coin.winrate) }}</div>
                    <div>V: ${{ "%.2f"|format(coin.value) }}</div>
                    <div>C: ${{ "%.2f"|format(coin.price) }}</div>
                </div>
                {% endfor %}
            </div>
            <button id="generate-coin">Generate New Coin</button>
        </div>
        <script>
            const coins = {{ coins|tojson|safe }};
        </script>
        <script src="{{ url_for('static', filename='script.js') }}"></script>
    </body>
</html>