@jonalex05/

Web Game

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • script.js
  • style.css
index.html
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
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>repl.it</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
  </head>
  <body>

    <p>The point of the game is to see who gets closer to 20. If you go over 20, you will lose automatically. The computer will not draw any more numbers if the last total was 15. Please type y or n.</p>
    <div>
       <button type="button" class="btn btn-success" onclick="computerBrain();">Click Here to Keep Playing! </button>
    </div>

    <div>
      <button type="button" class="btn btn-danger" onclick = "final();" id = "stop">Click Here to Stop Playing! </button>
    </div>
    
    <h3 id = "middle"></h3>
    
    <h3 id = "end"></h3>

    <h1 id = "userNumber"></h1>

    <script src="script.js"></script>
  </body>
</html>
result
console