Attempt to clarify installation instructions a little
[vchess.git] / client / src / utils / scoring.js
... / ...
CommitLineData
1// Default score message if none provided
2export function getScoreMessage(score, reverseColors) {
3 let eogMessage = "Undefined"; //not translated: unused
4 switch (score) {
5 case "1-0":
6 eogMessage = (!reverseColors ? "White win" : "Black win");
7 break;
8 case "0-1":
9 eogMessage = (!reverseColors ? "Black win" : "White win");
10 break;
11 case "1/2":
12 eogMessage = "Draw";
13 break;
14 case "?":
15 eogMessage = "Undetermined result";
16 break;
17 }
18 return eogMessage;
19}