function drawPath() {
  var d = [];
  for (var i = 0; i < avatarPath.length; i++) {
    d.push(i ? 'L' : 'M',
           avatarPath[i].x * SQUARE_SIZE + SQUARE_SIZE / 2 + 0.5,
           avatarPath[i].y * SQUARE_SIZE + SQUARE_SIZE / 2 + 0.5);
  }
  var element = document.getElementById('avatarPath');
  element.setAttribute('d', d.join(' '));
}
// Render the avatar's path.
Render the avatar's path.
Render the avatar ' s path .
function drawPath() {
  var d = [];
  for (var i = 0; i < avatarPath.length; i++) {
    d.push(i ? 'L' : 'M',
           avatarPath[i].x * SQUARE_SIZE + SQUARE_SIZE / 2 + 0.5,
           avatarPath[i].y * SQUARE_SIZE + SQUARE_SIZE / 2 + 0.5);
  }
  var element = document.getElementById('avatarPath');
  element.setAttribute('d', d.join(' '));
}
function drawPath ( ) { var d = [ ] ; for ( var i = 0 ; i < avatarPath . length ; i ++ ) { d . push ( i ? 'L' : 'M' , avatarPath [ i ] . x * SQUARE_SIZE + SQUARE_SIZE / 2 + 0.5 , avatarPath [ i ] . y * SQUARE_SIZE + SQUARE_SIZE / 2 + 0.5 ) ; } var element = document . getElementById ( 'avatarPath' ) ; element . setAttribute ( 'd' , d . join ( ' ' ) ) ; }
Render the avatar's path.
Render the avatar ' s path .