tracks/r/exercises/secret-handshake/example.R in trackler-2.1.0.21 vs tracks/r/exercises/secret-handshake/example.R in trackler-2.1.0.22

- old
+ new

@@ -3,23 +3,23 @@ # 1 = wink # 10 = double blink # 100 = close your eyes # 1000 = jump # 10000 = reverse - actions = c("wink", "double blink", "close your eyes", "jump") + actions <- c("wink", "double blink", "close your eyes", "jump") - bin = intToBits(n) + bin <- intToBits(n) - events = c() + events <- c() - for (i in 1:4){ + for (i in 1:4) { if (bin[i] > 0) { - events = c(events, actions[i]) + events <- c(events, actions[i]) } } if (bin[5] > 0) { - events = rev(events) + events <- rev(events) } events }