2019-07-01 18:09:22 +03:00
|
|
|
import term
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
term.erase_clear()
|
2020-10-26 14:14:21 +03:00
|
|
|
sleeping_line(5, 5, 5, '*')
|
|
|
|
standing_line(5, 5, 5, '*')
|
|
|
|
sleeping_line(5, 10, 5, '*')
|
|
|
|
standing_line(9, 5, 5, '*')
|
2019-07-01 18:09:22 +03:00
|
|
|
term.cursor_down(5)
|
|
|
|
print('\n')
|
|
|
|
println(term.bold(term.red('It Worked!')))
|
|
|
|
}
|
|
|
|
|
2020-10-26 14:14:21 +03:00
|
|
|
fn sleeping_line(x int, y int, size int, ch string) {
|
2019-07-01 18:09:22 +03:00
|
|
|
mut i := 0
|
|
|
|
for i < size {
|
2021-02-23 20:43:44 +03:00
|
|
|
term.set_cursor_position(
|
2020-10-26 14:14:21 +03:00
|
|
|
x: x + i
|
|
|
|
y: y
|
2021-02-23 20:43:44 +03:00
|
|
|
)
|
2019-07-01 18:09:22 +03:00
|
|
|
print(term.bold(term.yellow(ch)))
|
|
|
|
i++
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-26 14:14:21 +03:00
|
|
|
fn standing_line(x int, y int, size int, ch string) {
|
2019-07-01 18:09:22 +03:00
|
|
|
mut i := 0
|
|
|
|
for i < size {
|
2021-02-23 20:43:44 +03:00
|
|
|
term.set_cursor_position(
|
2020-10-26 14:14:21 +03:00
|
|
|
x: x
|
|
|
|
y: y + i
|
2021-02-23 20:43:44 +03:00
|
|
|
)
|
2019-07-01 18:09:22 +03:00
|
|
|
print(term.bold(term.yellow(ch)))
|
|
|
|
i++
|
|
|
|
}
|
2019-07-16 18:59:07 +03:00
|
|
|
}
|