Fix resign on checkmate; change password placeholder symbol.
This commit is contained in:
parent
a8869efebd
commit
f4e6d9bacf
@ -836,7 +836,7 @@ GAME.Const = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
State: {
|
State: {
|
||||||
Current: 0,
|
Normal: 0,
|
||||||
Checkmate: 1,
|
Checkmate: 1,
|
||||||
Resign: 2,
|
Resign: 2,
|
||||||
Default: 3,
|
Default: 3,
|
||||||
|
@ -410,7 +410,7 @@ const INTERFACE = {
|
|||||||
switch(INTERFACE_DATA.mode) {
|
switch(INTERFACE_DATA.mode) {
|
||||||
case INTERFACE.Mode.Player: {
|
case INTERFACE.Mode.Player: {
|
||||||
let b_resign = document.getElementById("button-resign");
|
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");
|
b_resign.removeAttribute("disabled");
|
||||||
} else {
|
} else {
|
||||||
b_resign.setAttribute("disabled", "");
|
b_resign.setAttribute("disabled", "");
|
||||||
|
@ -55,7 +55,7 @@ const UI = {
|
|||||||
password(id) {
|
password(id) {
|
||||||
let input = document.createElement("input");
|
let input = document.createElement("input");
|
||||||
input.setAttribute("type", "password");
|
input.setAttribute("type", "password");
|
||||||
input.setAttribute("placeholder", "◦◦◦◦");
|
input.setAttribute("placeholder", "◌◌◌◌◌◌");
|
||||||
if(id !== null) { input.setAttribute("id", id); }
|
if(id !== null) { input.setAttribute("id", id); }
|
||||||
return input;
|
return input;
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user