-
Notifications
You must be signed in to change notification settings - Fork 0
/
mc201516.R
56 lines (50 loc) · 922 Bytes
/
mc201516.R
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
figures <- list(
strsplit(" -=-
(\\ _ /)
( \\( )/ )
( )
`> <´
/ \\
`-._.-'
", "\n")[[1]],
strsplit(" -=-
(\\ _ /)
( \\( )/ ) MERRY CHRISTMAS &
( ) HAPPY NEW YEAR
`> <´ by C.
/ \\
`-._.-'
", "\n")[[1]],
strsplit(" ,\"\"\"-,
/,.____\\
() {_____}
(/ . . \\)
{`-=^=-`}
{ ` }
{ }
`-,-
", "\n")[[1]],
strsplit(" ,\"\"\"-,
/,.____\\
() {_____} HO HO HO!
(/ . . \\) MERRY CHRISTMAS
{`-=^=-`} by C.
{ ` }
{ }
`-,-
", "\n")[[1]]
)
sel <- sample(c(1, 3), 1)
top <- 25
sec <- 2
clc <- function(n=50) cat(rep("\n",n))
bk <- function(n=10) paste0(rep(" ", n), collapse="")
for(jj in 1:length(figures[[sel]])) {
clc()
for(ii in 1:jj) { cat(bk(), paste0(figures[[sel]][ii], "\n")) }
clc(top-jj)
Sys.sleep(sec)
}
clc()
for(ii in figures[[sel+1]]) { cat(bk(), paste0(ii, "\n")) }
clc(top-length(figures[[sel+1]]))