diff options
author | stale <redkugelblitzin@gmail.com> | 2022-06-05 20:43:32 -0300 |
---|---|---|
committer | stale <redkugelblitzin@gmail.com> | 2022-06-05 20:43:32 -0300 |
commit | e00fa116c51e728e341e48e4c5f9f09cf4d416fc (patch) | |
tree | 9dc60cd8c915ee0637ce73b765937c36cbf0fbb0 /assets/index.html | |
parent | aeb7beb3f9b154f4aefbaa1c08d822ed572461fb (diff) |
code cleanup, floodfill algo changed to iterative
Diffstat (limited to 'assets/index.html')
-rw-r--r-- | assets/index.html | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/assets/index.html b/assets/index.html index 9282726..f86287e 100644 --- a/assets/index.html +++ b/assets/index.html @@ -52,20 +52,39 @@ <form method="post" action="r" class="cent"> <fieldset> <legend>-={ Create a new room }=-</legend> - <label>room name<input name="rname" type="text" autofocus></label><br> - <label>board dimensions<br> + <label>room name <input name="rname" type="text" autofocus></label><br> + <label> + board dimensions <input name="rwidth" type="number" value="30" required> x <input name="rheight" type="number" value="20" required><br> - where<input name="rration" type="number" value="1" required> - in every<input name="rratiod" type="number" value="8" required> + where <input name="rration" type="number" value="1" required> + in every <input name="rratiod" type="number" value="8" required> tiles are mines </label><br> <label>public, ie. shown in the lobby <input name="raccess" type="checkbox" checked></label><br> - <label>safe first move (if possible)<input name="ralwayssafe1move" type="checkbox" checked></label><br> - <label>player limit<input name="rlimit" type="number" value="32"></label><br> + <label>safe first move (if possible) <input name="ralwayssafe1move" type="checkbox" checked></label><br> + <label>player limit <input name="rlimit" type="number" value="32"></label><br> <button id="createbtn">create</button> </fieldset> - <form> + </form> + <div class="statusline cent"> + <p id="ident-name"></p> + <a id="ident-clr" href="javascript:clear_ident();">clear identity</a> + </div> + <script> + function clear_ident() { + localStorage.removeItem("identity"); + document.location.reload(); + } + let ident = JSON.parse(localStorage.getItem("identity")); + let ident_elem = document.getElementById("ident-name"); + if (ident == null) { + ident_elem.innerHTML = "no identity yet"; + document.getElementById("ident-clr").style.display = "none"; + } else { + ident_elem.innerHTML = `you are <span style="color: ${ident.clr}">${ident.name}</span>`; + } + </script> </body> </html> |