life_for_site 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/life_for_site.rb +7 -11
- metadata +1 -1
data/lib/life_for_site.rb
CHANGED
@@ -68,11 +68,7 @@ class Life_for_site
|
|
68
68
|
|
69
69
|
def next_step()
|
70
70
|
num = 0
|
71
|
-
|
72
|
-
(0...@m).each do|j|
|
73
|
-
@life_map[i][j] = @life_map_change[i][j]
|
74
|
-
end
|
75
|
-
end
|
71
|
+
|
76
72
|
(0...@n).each do |i|
|
77
73
|
(0...@m).each do |j|
|
78
74
|
num = neighbors(i,j)
|
@@ -85,12 +81,12 @@ class Life_for_site
|
|
85
81
|
end
|
86
82
|
end
|
87
83
|
end
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
return @
|
84
|
+
(0...@n).each do|i|
|
85
|
+
(0...@m).each do|j|
|
86
|
+
@life_map[i][j] = @life_map_change[i][j]
|
87
|
+
end
|
88
|
+
end
|
89
|
+
return @life_map
|
94
90
|
end
|
95
91
|
|
96
92
|
def start_life(x_size, y_size)
|