Fix resign on checkmate; change password placeholder symbol.

This commit is contained in:
yukirij 2024-10-17 11:42:28 -07:00
parent a8869efebd
commit f4e6d9bacf
3 changed files with 3 additions and 3 deletions

View File

@ -836,7 +836,7 @@ GAME.Const = {
},
State: {
Current: 0,
Normal: 0,
Checkmate: 1,
Resign: 2,
Default: 3,

View File

@ -410,7 +410,7 @@ const INTERFACE = {
switch(INTERFACE_DATA.mode) {
case INTERFACE.Mode.Player: {
let b_resign = document.getElementById("button-resign");
if(GAME_DATA.state.code != GAME.Const.State.Resign && (GAME_DATA.turn & 1) == INTERFACE_DATA.player) {
if(GAME_DATA.state.code == GAME.Const.State.Normal && (GAME_DATA.turn & 1) == INTERFACE_DATA.player) {
b_resign.removeAttribute("disabled");
} else {
b_resign.setAttribute("disabled", "");

View File

@ -55,7 +55,7 @@ const UI = {
password(id) {
let input = document.createElement("input");
input.setAttribute("type", "password");
input.setAttribute("placeholder", "◦◦◦◦");
input.setAttribute("placeholder", "◌◌◌◌◌◌");
if(id !== null) { input.setAttribute("id", id); }
return input;
},