-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (42 loc) · 2.23 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
<!doctype html>
<html lang="en">
<head>
<link rel="shortcut icon" href="favicon.ico" />
<script src="assets/chess.js"></script>
<script src="assets/chessboard-0.3.0.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src ="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="assets/chessboard-0.3.0.css">
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="codepen.css">
</head>
<body>
<div id="board" style="width:450px"></div>
<p id="status-wrapper">Status: <span id="status"></span></p>
<p id="pgn-wrapper">PGN: <span id="pgn"></span></p>
<p id="fen-wrapper">FEN: <span id="fen"></span></p>
<p id="kastle-wrapper"><a title="The bit encoding of this board. Click here for explanation" href="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/VitamintK/Passant#kastle-kevin-aziz-suasin-transposition-lumping-encoding">KASTLE:</a> <span id="kastle"></span></p>
<div class="btn-wrapper">
<input class="game-button" type="button" id="startBtn" value="Start" />
<input class="game-button" type="button" id="clearBtn" value="Clear" />
<input class="game-button" type="button" id="colorBtn" value="Flip" />
</div>
<script type="text/javascript" src="codepen.js"></script>
<p id="pgn-wrap">Insert PGN: <input id="PGN_input" type = "text" name='sequence'>
<button id="PGN_button">Submit</button></p>
<p id="fen-wrap">Output FEN: <span id="outFEN"></span></p>
<script >
function myFunction(){
console.log(document.getElementById("PGN_input").value);
//alert('start');
//alert(PGN2FEN("1. e4 e5 2. d4 d5 { C21 King's Pawn Game: Beyer Gambit } 3. exd5 exd4"));
};
document.getElementById("PGN_button").addEventListener("click", myFunction);
//document.getElementById('fen-wrap').innerHTML = fen;
</script>
<script type = 'text/javascript' src = 'codepen.js'>
document.getElementById('fen-wrap').innerHTML = PGN2FEN(document.getElementById('PGN_input').value);
</script>
<script type="text/javascript" src="compiler.js"></script>
</body>
</html>