<commit_before>/* Things it would be nice to do
	
	- add toroid functionality to runLife()

*/

/* Things to fix

	- doesn't run if columns and rows are different

*/

var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');

var gridRows = 60;
var gridColumns = 30;
var cellWidth = canvas.width / gridColumns;
var cellHeight = canvas.height / gridRows;
var grid = [];


function setGrid(rows, columns) {
	for (r=0; r<rows; r++) {
		grid[r] = []
		for (c=0; c<columns; c++) {
			//randomly set initial life (at 50% chance to be alive)
			var iniAlive = Math.floor(Math.random()*2);
			grid[r][c] = { x: c*cellWidth, y: r*cellHeight, isAlive: 0, willBe: 0}
		}
	}
	return grid;
}

var grid = setGrid(gridRows, gridColumns);

function drawGrid() {
	for (r=0; r<grid.length; r++) {<commit_msg>commenting and resetting row and column values<commit_after>/* Things it would be nice to do
	
	- add toroid functionality to runLife()

*/

/* Things to fix

	- doesn't run if columns and rows are different
	- redo starter-pattern functions to accurately reference rows and columns

*/

var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');

var gridRows = 60;
var gridColumns = 60;
var cellWidth = canvas.width / gridColumns;
var cellHeight = canvas.height / gridRows;
var grid = [];


function setGrid(rows, columns) {
	for (r=0; r<rows; r++) {
		grid[r] = []
		for (c=0; c<columns; c++) {
			//randomly set initial life (at 50% chance to be alive)
			var iniAlive = Math.floor(Math.random()*2);
			grid[r][c] = { x: c*cellWidth, y: r*cellHeight, isAlive: 0, willBe: 0}
		}
	}
	return grid;
}

var grid = setGrid(gridRows, gridColumns);

function drawGrid() {
	for (r=0; r<grid.length; r++) {
{'fraction_non_alphanumeric': 0.14482758620689656, 'fraction_numerical': 0.014942528735632184, 'mean_word_length': 3.8361111111111112, 'pattern_counts': {'":': 0, '<': 9, '<?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': '2022934', 'n_tokens_mistral': 645, 'n_tokens_neox': 599, 'n_words': 199}