function Shell(tank) {
  this.tank = tank;
  var element = document.createElementNS(SVG_NS, 'circle');
  element.setAttribute('cx', 0);
  element.setAttribute('cy', 0);
  element.setAttribute('r', 1);
  element.setAttribute('class', 'shell player' + tank.playerNumber);
  var g = document.getElementById('landscape');
  g.appendChild(element);

  this.hexX = tank.hexX;
  this.hexY = tank.hexY;
  this.direction = tank.direction;
  this.element = element;
  this.render(false);
}
// Constructor for a new shell (bullet).
Constructor for a new shell (bullet).
Constructor for a new shell ( bullet ) .
function Shell(tank) {
  this.tank = tank;
  var element = document.createElementNS(SVG_NS, 'circle');
  element.setAttribute('cx', 0);
  element.setAttribute('cy', 0);
  element.setAttribute('r', 1);
  element.setAttribute('class', 'shell player' + tank.playerNumber);
  var g = document.getElementById('landscape');
  g.appendChild(element);
  this.hexX = tank.hexX;
  this.hexY = tank.hexY;
  this.direction = tank.direction;
  this.element = element;
  this.render(false);
}
function Shell ( tank ) { this . tank = tank ; var element = document . createElementNS ( SVG_NS , 'circle' ) ; element . setAttribute ( 'cx' , 0 ) ; element . setAttribute ( 'cy' , 0 ) ; element . setAttribute ( 'r' , 1 ) ; element . setAttribute ( 'class' , 'shell player' + tank . playerNumber ) ; var g = document . getElementById ( 'landscape' ) ; g . appendChild ( element ) ; this . hexX = tank . hexX ; this . hexY = tank . hexY ; this . direction = tank . direction ; this . element = element ; this . render ( false ) ; }
Constructor for a new shell (bullet).
Constructor for a new shell ( bullet ) .