(Mis-)use Javascript's function-as-object feature for algToMoves.