summaryrefslogtreecommitdiff
path: root/maize-maze/index.html
blob: 36bae40d846d58c3a19d832599435b3e8edcf74f (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html>
  <head>
    <title>Amazeing Maize Maze</title>
		<meta charset="utf-8">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
    <link href="css/styles.css" rel="stylesheet">
  </head>
  <body>

    <div class="modal fade" id="help-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title" id="exampleModalLabel">Controls</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <div class="modal-body">
            <ul>
              <li>
                Move with arrow keys, WASD, or IJKL
              </li>
              <li>
                h to toggle a hint
              </li>
              <li>
                p to toggle the shortest path
              </li>
              <li>
                b to toggle breadcrumbs
              </li>
            </ul>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
          </div>
        </div>
      </div>
    </div>

    <div style="text-align: center">
      <h1>The A-maze-ing Maize Maze!</h1>
      <p>Get to the fire to make popcorn! Current Time: <span style="color: green; font-size:24px" id="elapsed-time"></span> seconds</p>
      <p>
        <button type="button" class="button" data-toggle="modal" data-target="#help-modal">
          Show me the controls!
        </button>
      </p>
      <p>
        <a onclick="initialize(5)" class="button">5x5</a>
        <a onclick="initialize(10)" class="button">10x10</a>
        <a onclick="initialize(15)" class="button">15x15</a>
        <a onclick="initialize(20)" class="button">20x20</a>
      </p>
    </div>
    <div class="canvas-holder">
      <canvas id="canvas" width="1000" height="1000"></canvas>
    </div>
    <div style="text-align: center;">
      <br>
      "Low" scores (player path length - shortest path length):
      <div id="scores" style="max-height: 5vh; overflow-y: scroll"></div>
    </div>
    <script src="js/assets.js"></script>
    <script src="js/helpers.js"></script>
    <script src="js/json-ds.js"></script>
    <script src="js/keyboard.js"></script>
    <script src="js/maze.js"></script>
    <script src="js/game.js"></script>
  </body>
</html>