extend str {
fn repeat(self, times) {
return self * times
}
}
fn wave(top) {
let c = 0
while c < top {
let x = 2
while x < 7 {
!" ".repeat(x**2+10) + "*\n"
x = x + 1
}
x = 3
while x > -4 {
!" ".repeat(x**2*-1+62) + "*\n"
x = x - 1
}
x = -6
while x < -1 {
!" ".repeat(x**2+10) + "*\n"
x = x + 1
}
x = -3
while x < 4 {
!" ".repeat(x**2) + "*\n"
x = x + 1
}
c = c + 1
}
}