-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.rb
More file actions
30 lines (29 loc) · 714 Bytes
/
tools.rb
File metadata and controls
30 lines (29 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module Tools
def treeBase(var, width, tempstr)
for i in 1..var
tempstr += " " * (width / 2) + "ТTTTT"
tempstr += "\n"
end
return tempstr
end
def fillCurrentFloor(branchCount, width, count, tempstr)
tempstr += " " * ((width - branchCount + 5) / 2)
if branchCount > 1
if count % 2 == 0
tempstr += "@"
tempstr += "*" * branchCount
tempstr += "\n"
else
tempstr += "*" * branchCount
tempstr += "@"
tempstr += "\n"
end
else
tempstr += "W" * branchCount
tempstr += "\n"
tempstr += " " * ((width - branchCount + 5) / 2)
tempstr += "*" * branchCount
tempstr += "\n"
end
end
end