<commit_before>/*
* Created with hexamap.
* User: bretshack
* Date: 2014-05-19
* Time: 09:04 PM
*/


define(["app/getScreenCenter", "app/coordinates", "svg.min", "app/hexagon"], function(getScreenCenter, coordinates, SVG, Hexagon) {
  var canvas = SVG('canvas')
  var centerx = getScreenCenter.x;
  var centery = getScreenCenter.y;
  var size = 30;
  var shifty = size * 3/2;
  var shiftx = Math.sqrt(3)/2* size;
  
  var grid = [];
  var griddraw = canvas.group();
 
  
  var col = 0;
  var row = 0;
  for (col=9;col>=-9;col--) {
    for (row=-9;row>=9;row++) {
      var hex = new Hexagon(centerx+(shiftx*col),centery-(shifty*row),size,col,row);
      grid.push(hex);
      griddraw.add(canvas.polygon(hex.path).fill('none').stroke({ width: 3 }));
      alert(col+", "+row);
    }
  };
  
  /*
  var hex00 = new Hexagon(centerx,centery,size, 0, 0);
  
  
  //var hex00draw = canvas.polygon(hex00.path).fill('none').stroke({ width: 3 });
  griddraw.add(canvas.polygon(hex00.path).fill('none').stroke({ width: 3 }));<commit_msg>Trying to create the grid<commit_after>/*
* Created with hexamap.
* User: bretshack
* Date: 2014-05-19
* Time: 09:04 PM
*/


define(["app/getScreenCenter", "app/coordinates", "svg.min", "app/hexagon"], function(getScreenCenter, coordinates, SVG, Hexagon) {
  var canvas = SVG('canvas')
  var centerx = getScreenCenter.x;
  var centery = getScreenCenter.y;
  var size = 30;
  var shifty = size * 3/2;
  var shiftx = Math.sqrt(3)/2* size;
  
  var grid = [];
  var griddraw = canvas.group();
 
  
  var col = 9;
  var row = -9;
  for (col=9;col>=-9;col--) {
    for (row=-9;row<=9;row++) {
      var hex = new Hexagon(centerx+(shiftx*col*2),centery+(shifty*row*2),size,col,row);
      grid.push(hex);
      griddraw.add(canvas.polygon(hex.path).fill('none').stroke({ width: 3 }));
      alert(col + ", " + row);
    }
  }
  
  /*
  var hex00 = new Hexagon(centerx,centery,size, 0, 0);
  
  
  //var hex00draw = canvas.polygon(hex00.path).fill('none').stroke({ width: 3 });
  griddraw.add(canvas.polygon(hex00.path).fill('none').stroke({ width: 3 }));
{'fraction_non_alphanumeric': 0.1936416184971098, 'fraction_numerical': 0.036608863198458574, 'mean_word_length': 3.485961123110151, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, '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': '55274', 'n_tokens_mistral': 855, 'n_tokens_neox': 803, 'n_words': 160}