Started code review + some fixes (unfinished)
[vchess.git] / client / src / utils / scoring.js
CommitLineData
77c50966
BA
1// Default score message if none provided
2export function getScoreMessage(score) {
3 let eogMessage = "Undefined"; //not translated: unused
6808d7a1 4 switch (score) {
77c50966
BA
5 case "1-0":
6 eogMessage = "White win";
7 break;
8 case "0-1":
9 eogMessage = "Black win";
10 break;
11 case "1/2":
12 eogMessage = "Draw";
13 break;
14 case "?":
15 eogMessage = "Unknown";
16 break;
17 }
18 return eogMessage;
19}