projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better Schess notation when introducing pieces while castling
[vchess.git]
/
client
/
src
/
utils
/
scoring.js
diff --git
a/client/src/utils/scoring.js
b/client/src/utils/scoring.js
index
9c6d25f
..
3d54128
100644
(file)
--- a/
client/src/utils/scoring.js
+++ b/
client/src/utils/scoring.js
@@
-1,18
+1,18
@@
// Default score message if none provided
// Default score message if none provided
-export function getScoreMessage(score) {
+export function getScoreMessage(score
, reverseColors
) {
let eogMessage = "Undefined"; //not translated: unused
switch (score) {
case "1-0":
let eogMessage = "Undefined"; //not translated: unused
switch (score) {
case "1-0":
- eogMessage =
"White win"
;
+ eogMessage =
(!reverseColors ? "White win" : "Black win")
;
break;
case "0-1":
break;
case "0-1":
- eogMessage =
"Black win"
;
+ eogMessage =
(!reverseColors ? "Black win" : "White win")
;
break;
case "1/2":
eogMessage = "Draw";
break;
case "?":
break;
case "1/2":
eogMessage = "Draw";
break;
case "?":
- eogMessage = "Un
known
";
+ eogMessage = "Un
determined result
";
break;
}
return eogMessage;
break;
}
return eogMessage;