Ivana Lipnerova
19. 3. 2016
uses Shiny's functions to let user go through the trials (e.g. do actions):
win your way out of the Temple of Trials
opponent <- (sample(1:6, 1, replace = T)); you<- (sum((sample(1:6, 3, replace = T))))
#in place of 3 there is input from user in the app
winLose <- as.character(opponent <= you)
df<-data.frame(opponent, you, winLose); colnames(df) <- c("Your opponent", "You", "Do you win?")
df
Your opponent You Do you win?
1 1 11 TRUE