Attempt to clarify installation instructions a little
[vchess.git] / client / src / data / problemCheck.js
CommitLineData
6808d7a1 1export function checkProblem(p) {
e50a8025 2 const vid = parseInt(p.vid, 10);
6808d7a1 3 if (isNaN(vid) || vid <= 0) return "Please select a variant";
89021f18 4
866842c3 5 if (!V.IsGoodFen(p.fen)) return "Errors in FEN";
6808d7a1 6
f593e88f 7 if (p.instruction.trim().length == 0) return "Missing instructions";
032312bf 8
f593e88f 9 if (p.solution.trim().length == 0) return "Missing solution";
032312bf 10
6808d7a1 11 return "";
89021f18 12}