Create a new web play object
new_wp(game, bots, human = draw_human_pos(human_draw_method = human_draw_method, numPlayers = game$vg$params$numPlayers, human = 0), human_draw_method = c("cycle", "random", "fixed")[1], wpUI = "wpUI", verbose = FALSE, pages.dir = file.path(getwd(), "pages"), custom = list(), pre.page.handler = NULL, post.page.handler = NULL, finish.handler = wp.default.finish.handler, ...)
game | A gtree game generated with |
---|---|
bots | A list with one bots for every player. Also add a bot for the human player. You can call |
human | index of the player that is played by a human in the first play of the web app. |
human_draw_method | Method how the index of the human player is determined by default if a new play is started. The default |
wpUI | the id of the |
verbose | shall information about state of play be printed to the standard output? |
pages.dir | the directory in which the Rmd files for the stage pages can be found. By default |
custom | A list of custom parameters that will be passed to handlers. |
pre.page.handler | a function that is called before a page is shown to a human. It should return a list of values that can be accessed in the whiskers of the page Rmd file. |
post.page.handler | a function that is called after a human made input in a stage. Can for example be used to update a population play summary. (See the KuhnPoker example) |
finish.handler | is called when the final results page of a play is left. The default handler simply starts a new play. |
Other Web Play: get_wp
,
set_wp_for_app
, wpDevelApp
,
wp_copy
, wp_developer_ui
,
wp_reset
, wp_set_to_play