code: function isMoveValid (src, dest, validMoves) {
  	let
  		i = 0,
  		isFound = (expr, sq) => {
  			return ((typeof expr === 'string' && sq.file + sq.rank === expr) ||
  				(expr.rank && expr.file &&
  					sq.file === expr.file && sq.rank === expr.rank));
  		},
  		squares = [];
  
  	for (i = 0; i < validMoves.length; i++) {
  		if (isFound(src, validMoves[i].src)) {
  			squares = validMoves[i].squares;
  		}
  	}
  
  	if (squares && squares.length > 0) {
  		for (i = 0; i < squares.length; i++) {
  			if (isFound(dest, squares[i])) {
  				return true;
  			}
  		}
  	}
  
  	return false;
  }
docs: private methods