Commit | Line | Data |
---|---|---|
77c50966 BA |
1 | // Default score message if none provided |
2 | export 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 "?": | |
866842c3 | 15 | eogMessage = "Undetermined result"; |
77c50966 BA |
16 | break; |
17 | } | |
18 | return eogMessage; | |
19 | } |