Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Pragyanur committed Aug 11, 2023
1 parent b343a17 commit 4d1160b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/sketch-03.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ function grid() {

function colorAlive() {
stroke(255, 150);
fill(20, 100, 120, 200);
fill(200, 100, 50, 200);
for (let i = 0; i < columns; i++) {
for (let j = 0; j < rows; j++) {
if (life[i][j] == 1) {
rect(i * s, j * s, s, s);
rect(i * s, j * s, s, s, 2);
}
}
}
Expand Down Expand Up @@ -210,3 +210,6 @@ function draw() {
colorAlive();
}

function mouseClicked() {
randomAlive();
}

0 comments on commit 4d1160b

Please sign in to comment.