+/** @param {!string} fen
+ * @return {!string}
+ *
+ * Return whose side it is to play (W or B), given a FEN.
+ * This is in uppercase due to historical reasons, which we
+ * should get rid of.
+ */
+function find_toplay(fen) {
+ return fen.split(' ')[1].toUpperCase();
+}
+
+/** @param {!string} fen
+ * @return {!number}
+ *
+ * Return the move clock, starting from 1. See also find_toplay().
+ */
+function find_move_num(fen) {
+ return parseInt(fen.split(' ')[5]);
+}
+