repl.it
@simontiger/

Chess AI User-friendly

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • img
  • script.js
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
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Chess AI</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/oakmac/chessboardjs/lib/chessboard.css" />
    <style>
      .board {
        width: 400px;
        margin: auto;
      }

      #info {
        width: 400px;
        margin: auto;
      }
    </style>
  </head>
  <body>
    <h3 class="board">Chess AI</h3>
    <div id="myBoard" class="board"></div>
    <br />
    <div id="info">
      Search depth: <select id="searchDepth">
        <option>1</option>
        <option>2</option>
        <option selected>3</option>
        <option>4</option>
        <option>5</option>
      </select>
    </div>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js"></script>
    <script src="https://unpkg.com/@chrisoakman/[email protected]/dist/chessboard-1.0.0.min.js"></script>
    <script src="https://cdn.rawgit.com/lhartikk/simple-chess-ai/master/lib/js/chess.js"></script>
    <script src="script.js"></script>
  </body>
</html>
result
console
?