function Tank(playerNumber) {
  this.playerNumber = playerNumber;
  var element = document.createElementNS(SVG_NS, 'polygon');
  element.setAttribute('points', this.PATH);
  element.setAttribute('class', 'tank player' + playerNumber);
  var g = document.getElementById('landscape');
  g.appendChild(element);
  this.element = element;
  this.shell = null;
  this.firing = 0;
  this.score = 0;
  // Shells that this tank hits.
  this.intersectedShells = [];
  this.placeRandomly();
}
// Player number should be 1-3 and determines tank's colour.
Player number should be 1-3 and determines tank's colour.
Player number should be 1 - 3 and determines tank ' s colour .
function Tank(playerNumber) {
  this.playerNumber = playerNumber;
  var element = document.createElementNS(SVG_NS, 'polygon');
  element.setAttribute('points', this.PATH);
  element.setAttribute('class', 'tank player' + playerNumber);
  var g = document.getElementById('landscape');
  g.appendChild(element);
  this.element = element;
  this.shell = null;
  this.firing = 0;
  this.score = 0;
  this.intersectedShells = [];
  this.placeRandomly();
}
function Tank ( playerNumber ) { this . playerNumber = playerNumber ; var element = document . createElementNS ( SVG_NS , 'polygon' ) ; element . setAttribute ( 'points' , this . PATH ) ; element . setAttribute ( 'class' , 'tank player' + playerNumber ) ; var g = document . getElementById ( 'landscape' ) ; g . appendChild ( element ) ; this . element = element ; this . shell = null ; this . firing = 0 ; this . score = 0 ; this . intersectedShells = [ ] ; this . placeRandomly ( ) ; }
Player number should be 1-3 and determines tank's colour.
Player number should be 1 - 3 and determines tank ' s colour .
// Shells that this tank hits.