<commit_before>var Game = function () {
  this.activePlayers = 0;
  this.numberOfRobots = 1;
  this.spriteSize = 64;
  this.stepSize = 10;
};

Game.prototype.pixelize = function(number) { return number + 'px'; };
Game.prototype.dePixel = function(string) { return string.slice( 0, -2 ); };
Game.prototype.rand  = function(n){ return Math.floor( Math.random() * n ); };
Game.prototype.randX = function() { 
  var randx = this.rand(this.maxX()) + this.minX();
  var xoffset = randx % this.spriteSize;
  randx -= xoffset;
  return this.pixelize(randx); 
};
Game.prototype.randY = function() {
  var randy = this.rand(this.maxY()) + this.minY();
  var yoffset = randy % this.spriteSize;
  randy -= yoffset;
  return this.pixelize(randy);
};
Game.prototype.minX = function() { return 0; };
Game.prototype.maxX = function() { return window.innerWidth - this.spriteSize; };
Game.prototype.minY = function() { return 60; };
Game.prototype.maxY = function() { return window.innerHeight - this.spriteSize -60; };

Game.prototype.initalize = function() {
  game.addRobots();
  game.moveRobots(d3.selectAll('.robot'));
};

Game.prototype.addRobots = function() {
  d3.select('.playArea').selectAll('.robot')
    .data(_.range(this.numberOfRobots))
    .enter()
    .insert('div')
    .classed('robot', true)
    .style({
      top: this.randY.bind(this),
      left: this.randX.bind(this)
    });
};

Game.prototype.moveRobots = function(elements) {
  var context = this;
  elements.each(function(d){
    context.moveRobot.call(context, d3.select(this), d % 5);
  });
};

Game.prototype.getMoveFunc = function(number) {
  console.log('get move', number);
  if (number === 0) {
    return this.moveRobotNorth;
  } else if (number === 1) {
    return this.moveRobotEast;<commit_msg>robot movement OK for moving on<commit_after>var Game = function () {
  this.activePlayers = 0;
  this.numberOfRobots = 50;
  this.spriteSize = 64;
  this.stepSize = 10;
};

Game.prototype.pixelize = function(number) { return number + 'px'; };
Game.prototype.dePixel = function(string) { return string.slice( 0, -2 ); };
Game.prototype.rand  = function(n){ return Math.floor( Math.random() * n ); };
Game.prototype.randX = function() { 
  var randx = this.rand(this.maxX()) + this.minX();
  var xoffset = randx % this.spriteSize;
  randx -= xoffset;
  return this.pixelize(randx); 
};
Game.prototype.randY = function() {
  var randy = this.rand(this.maxY()) + this.minY();
  var yoffset = randy % this.spriteSize;
  randy -= yoffset;
  return this.pixelize(randy);
};
Game.prototype.minX = function() { return 0; };
Game.prototype.maxX = function() { return window.innerWidth - this.spriteSize; };
Game.prototype.minY = function() { return 60; };
Game.prototype.maxY = function() { return window.innerHeight - this.spriteSize; };

Game.prototype.initalize = function() {
  game.addRobots();
  game.moveRobots(d3.selectAll('.robot'));
};

Game.prototype.addRobots = function() {
  d3.select('.playArea').selectAll('.robot')
    .data(_.range(this.numberOfRobots))
    .enter()
    .insert('div')
    .classed('robot', true)
    .style({
      top: this.randY.bind(this),
      left: this.randX.bind(this)
    });
};

Game.prototype.moveRobots = function(elements) {
  var context = this;
  elements.each(function(d){
    context.moveRobot.call(context, d3.select(this), d % 5);
  });
};

Game.prototype.getMoveFunc = function(number) {
  if (number === 0) {
    return this.moveRobotNorth;
  } else if (number === 1) {
    return this.moveRobotEast;
{'fraction_non_alphanumeric': 0.17235494880546076, 'fraction_numerical': 0.010523321956769055, 'mean_word_length': 3.8443526170798896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '837972', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1214, 'n_words': 236}