Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int y = 0; y < mapHeight; y++) {
- for (int x = 0; x < mapWidth; x++) {
- int neighbours = CountAliveNeighbours(oldMap, x, y);
- if(oldMap[y,x] == MV.floor){
- if(deadLimit > neighbours){
- map[y,x] = MV.wall;
- }else{
- map[y,x] = MV.floor;
- }
- }else{
- if(neighbours > birthLimit){
- map[y,x] = MV.floor;
- }else{
- map[y,x] = MV.wall;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement