starmap.js
// create a planet for each planet cell
create a planet for each planet cell
create a planet for each planet cell
function generatePlanets() {
	planets = [];
	for (var i = 0; i < planet_cells.length; i++)
	{
		var planet = {
			x: GRID_PADDING_H + PLANET_RADIUS + (CELL_SIZE - PLANET_RADIUS * 2) * Math.random() + planet_cells[i].x * CELL_SIZE,
			y: GRID_PADDING_V + PLANET_RADIUS + (CELL_SIZE - PLANET_RADIUS * 2) * Math.random() + planet_cells[i].y * CELL_SIZE,
			numConnections: 0,
			connectedToStart: false,
			planetsConnected: [],
			index: i
		}
		planets.push(planet);
	}
}
function generatePlanets ( ) { planets = [ ] ; for ( var i = 0 ; i < planet_cells . length ; i ++ ) { var planet = { x : GRID_PADDING_H + PLANET_RADIUS + ( CELL_SIZE - PLANET_RADIUS * 2 ) * Math . random ( ) + planet_cells [ i ] . x * CELL_SIZE , y : GRID_PADDING_V + PLANET_RADIUS + ( CELL_SIZE - PLANET_RADIUS * 2 ) * Math . random ( ) + planet_cells [ i ] . y * CELL_SIZE , numConnections : 0 , connectedToStart : false , planetsConnected : [ ] , index : i } planets . push ( planet ) ; } }
create a planet for each planet cell
create a planet for each planet cell