|
@@ -32,6 +32,11 @@ func generate_row():
|
|
|
|
|
|
|
|
|
func generate_cell(x, y):
|
|
|
+ if randi() % 2 : # 50% of generation
|
|
|
+ build_brick(x, y)
|
|
|
+
|
|
|
+
|
|
|
+func build_brick(x, y):
|
|
|
set_cell(x, y, Tile.BRICK)
|
|
|
living_cells[Vector2(x, y)] = current_row
|
|
|
|
|
@@ -56,6 +61,7 @@ func move():
|
|
|
|
|
|
|
|
|
func _ready():
|
|
|
+ randomize()
|
|
|
generate_and_move()
|
|
|
|
|
|
|