Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 21 lines (18 sloc) 0.405 kb
775a77c @kastner stuff
authored
1 TOTAL = 15
2 CHAR = "*"
3 EMPTY = "."
4
5 max = (TOTAL/3 + 1) * 2 - 1
6
7 (TOTAL + 1).times do |i|
8 if i < TOTAL / 3
9 s = (i + 1) * 2 - 1
10 s2 = EMPTY * (max - s) + CHAR * s
11 s3 = s2 + CHAR + s2.reverse
12 puts s3 + s3.reverse
13 else
14 from_top = i - TOTAL / 3
15 line = from_top * 4
16 s = ((TOTAL * 3) - line)
17 s2 = TOTAL * 3 - s
18 puts EMPTY * (s2 / 2) + CHAR * s + EMPTY * (s2 / 2)
19 end
20 end
Something went wrong with that request. Please try again.