play_warrior | R Documentation |
Attempt inbuilt levels of R Warrior.
play_warrior( ai, level = 1, tower = c("beginner"), warrior_name = "Fisher", sleep = getOption("rwarrior.sleep", ifelse(interactive(), 0.6, 0)), practice = FALSE )
ai |
AI function to control your warrior. |
level |
Level number. |
tower |
Tower the level comes from. |
warrior_name |
Name of your warrior, for flavor. |
sleep |
Time between text updates in seconds. Set to "prompt" to only progress when pressing the return key. |
practice |
If TRUE, any functions available for that tower may be used. |
A tibble if successful, FALSE if unsuccessful, and NA if the AI function caused an error or no action was called.
AI <- function(warrior, memory) { if(is.null(memory)) { # set memory initial values here } # insert AI code here memory } play_warrior(AI, level = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.