Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (; tofill >0; ) {
- for (int i = 0; i < height; i++) {
- for (int j = 0; j < width; j++) {
- if (!cells[i][j].isAlive() && tofill>0 && Math.random() >= 0.5) {
- cells[i][j].comeToLife();
- tofill--;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement