projects
/
xogo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d01282a
)
update
author
Benjamin Auder
<benjamin.auder@somewhere>
Mon, 1 Jan 2024 15:34:18 +0000
(16:34 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Mon, 1 Jan 2024 15:34:18 +0000
(16:34 +0100)
variants/Dice/class.js
patch
|
blob
|
blame
|
history
diff --git
a/variants/Dice/class.js
b/variants/Dice/class.js
index
8c3eed4
..
02e4f6d
100644
(file)
--- a/
variants/Dice/class.js
+++ b/
variants/Dice/class.js
@@
-54,7
+54,8
@@
export default class DiceRules extends ChessRules {
this.afterPlay = (move_s, newTurn, ops) => {
// Movestack contains only one move:
move_s[0].toplay = this.getRandomPiece(this.turn);
this.afterPlay = (move_s, newTurn, ops) => {
// Movestack contains only one move:
move_s[0].toplay = this.getRandomPiece(this.turn);
- super.displayMessage(this.message, move_s[0].toplay);
+ super.displayMessage(
+ this.message, "To play: " + move_s[0].toplay.toUpperCase());
o.afterPlay(move_s, newTurn, ops);
};
}
o.afterPlay(move_s, newTurn, ops);
};
}
@@
-64,7
+65,7
@@
export default class DiceRules extends ChessRules {
this.toplay = fenParsed.toplay;
this.message = document.createElement("div");
C.AddClass_es(this.message, "piece-text");
this.toplay = fenParsed.toplay;
this.message = document.createElement("div");
C.AddClass_es(this.message, "piece-text");
- this.message.innerHTML =
this.toplay
;
+ this.message.innerHTML =
"To play: " + this.toplay.toUpperCase()
;
let container = document.getElementById(this.containerId);
container.appendChild(this.message);
}
let container = document.getElementById(this.containerId);
container.appendChild(this.message);
}
@@
-101,7
+102,8
@@
export default class DiceRules extends ChessRules {
playReceivedMove(moves, callback) {
this.toplay = moves[0].toplay; //only one move
playReceivedMove(moves, callback) {
this.toplay = moves[0].toplay; //only one move
- super.displayMessage(this.message, this.toplay);
+ super.displayMessage(
+ this.message, "To play: " + this.toplay.toUpperCase());
super.playReceivedMove(moves, callback);
}
super.playReceivedMove(moves, callback);
}