conway (Entry Nr. 307, by user 1 | edit) |
|
|
| function Conway(Width, Height)
{
this.randomize = function ()
{
this.Cells = new Array();
for (var map=0;map<2;map++)
{
this.Cells[map] = new Array();
for (y=-1;y 1;
if (x==-1 || y==-1 || x==this.Width || y==this.Height) Color=0;
this.Cells[map][y][x]=Color;
if (map==0) window.CG.drawCell(x,y,Color);
}
}
}
this.CurrentMap=0;
}
this.clear = function ()
{
this.Cells = new Array();
for (var map=0;map<2;map++)
{
this.Cells[map] = new Array();
for (y=-1;y |
|
|
Create a new entry at this position
|
|
|