1# nocov start
2praise <- function() {
3  plain <- c(
4    "You rock!",
5    "You are a coding rockstar!",
6    "Keep up the good work.",
7    "Woot!",
8    "Way to go!",
9    "Nice code.",
10    praise::praise("Your tests are ${adjective}!"),
11    praise::praise("${EXCLAMATION} - ${adjective} code.")
12  )
13  utf8 <- c(
14    "\U0001f600", # smile
15    "\U0001f973", # party face
16    "\U0001f638", # cat grin
17    paste0(strrep("\U0001f389\U0001f38a", 5), "\U0001f389"),
18    "\U0001f485 Your tests are beautiful \U0001f485",
19    "\U0001f947 Your tests deserve a gold medal \U0001f947",
20    "\U0001f308 Your tests are over the rainbow \U0001f308",
21    "\U0001f9ff Your tests look perfect \U0001f9ff",
22    "\U0001f3af Your tests hit the mark \U0001f3af",
23    "\U0001f41d Your tests are the bees knees \U0001f41d",
24    "\U0001f4a3 Your tests are da bomb \U0001f4a3",
25    "\U0001f525 Your tests are lit \U0001f525"
26  )
27
28  x <- if (cli::is_utf8_output()) c(plain, utf8) else plain
29  sample(x, 1)
30}
31
32praise_emoji <- function() {
33  if (!cli::is_utf8_output()) {
34    return("")
35  }
36
37  emoji <- c(
38    "\U0001f600", # smile
39    "\U0001f973", # party face
40    "\U0001f638", # cat grin
41    "\U0001f308", # rainbow
42    "\U0001f947", # gold medal
43    "\U0001f389", # party popper
44    "\U0001f38a" # confetti ball
45  )
46  sample(emoji, 1)
47}
48
49encourage <- function() {
50  x <- c(
51    "Keep trying!",
52    "Don't worry, you'll get it.",
53    "No one is perfect!",
54    "No one gets it right on their first try",
55    "Frustration is a natural part of programming :)",
56    "I believe in you!"
57  )
58
59  sample(x, 1)
60}
61# nocov end
62