dao-game / commit
Temporarily disable remote game.
public/choice.html | 44 ++++++++++++++++++++++++++ public/index.html | 92 ++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 102 insertions(+), 34 deletions(-) diff --git a/public/choice.html b/public/choice.html new file mode 100644 index 0000000..abf75e1 --- /dev/null +++ b/public/choice.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8" /> + <title>Dao Game</title> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <link rel="icon" href="yin-yang.svg" type="image/svg+xml" /> + <link rel="stylesheet" href="styles.css" /> + <script defer src="js/index.js"></script> +</head> + +<body> + <div class="title"> + <p>Board game <a href="https://en.wikipedia.org/wiki/Dao_(game)" target="_blank" rel="noopener">Dao</a>.</p> + </div> + + <div class="info"> + The game consists of only one simple rule and three ways to win. Rules: + <ul> + <li>Pieces move in a straight line, including diagonally, as far as possible with no jumps.</li> + </ul> + Ways to win: + <ol> + <li>Arrange your pieces in a straight line on the board (not diagonally)</li> + <li>Occupy four corners of the board</li> + <li>Form a 2x2 square anywhere on the board</li> + </ol> + </div> + <hr /> + <div class="info"> + <div>Play local (pass-and-play) game of Dao <a href="local.html">here</a>.</div> + <!-- <div>Play online game of Dao <a href="remote.html">here</a>.</div> --> + </div> + + <div class="info"> + <p> + Here is the + <a href="https://gitlab.com/fuzzy-rp/dao-game" target="_blank" rel="noopener">source code</a> + </p> + </div> +</body> + +</html> \ No newline at end of file diff --git a/public/index.html b/public/index.html index adba5c1..4c9952d 100644 --- a/public/index.html +++ b/public/index.html @@ -2,43 +2,67 @@ <html lang="en"> <head> - <meta charset="utf-8" /> - <title>Dao Game</title> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <link rel="icon" href="yin-yang.svg" type="image/svg+xml" /> - <link rel="stylesheet" href="styles.css" /> - <script defer src="js/index.js"></script> + <meta charset="utf-8" /> + <title>Dao Game</title> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <link rel="icon" href="yin-yang.svg" type="image/svg+xml" /> + <link rel="stylesheet" href="styles.css" /> + <script defer src="js/local.js"></script> </head> <body> - <div class="title"> - <p>Board game <a href="https://en.wikipedia.org/wiki/Dao_(game)" target="_blank" rel="noopener">Dao</a>.</p> - </div> - - <div class="info"> - The game consists of only one simple rule and three ways to win. Rules: - <ul> - <li>Pieces move in a straight line, including diagonally, as far as possible with no jumps.</li> - </ul> - Ways to win: - <ol> - <li>Arrange your pieces in a straight line on the board (not diagonally)</li> - <li>Occupy four corners of the board</li> - <li>Form a 2x2 square anywhere on the board</li> - </ol> - </div> - <hr /> - <div class="info"> - <div>Play local (pass-and-play) game of Dao <a href="local.html">here</a>.</div> - <div>Play online game of Dao <a href="remote.html">here</a>.</div> - </div> - - <div class="info"> - <p> - Here is the - <a href="https://gitlab.com/fuzzy-rp/dao-game" target="_blank" rel="noopener">source code</a> - </p> - </div> + <div id="placeholders" class="invisible"> + <p class="piece p1-piece" id="default-p1-piece"></p> + <p class="piece p2-piece" id="default-p2-piece"></p> + </div> + <main> + <div class="controls"> + <span class="p1-turn-text">Red</span> + <span class="p2-turn-text">Blue</span> + </div> + + <table id="table"></table> + + <div class="controls"> + <button type="button" class="button" id="undo-button"> + Undo + </button> + <button type="button" class="button" id="reset-button"> + Reset + </button> + </div> + </main> + + <div class="title"> + <p>Board game <a href="https://en.wikipedia.org/wiki/Dao_(game)" target="_blank" rel="noopener">Dao</a>.</p> + </div> + + <div class="info"> + The game consists of only one simple rule and three ways to win. + + Rules: + <ul> + <li> + Pieces move in a straight line, including diagonally, as far as possible with no jumps. + </li> + </ul> + Ways to win: + <ol> + <li>Arrange your pieces in a straight line on the board (not diagonally)</li> + <li>Occupy four corners of the board</li> + <li>Form a 2x2 square anywhere on the board</li> + </ol> + </div> + + <hr /> + + <div class="info"> + <p> + Here is the + <a href="https://gitlab.com/fuzzy-rp/dao-game" target="_blank" rel="noopener">source code</a> + </p> + </div> + </body> </html> \ No newline at end of file