Description Details Public fields Methods See Also Examples
An R6Class object to simulate simplified gameplay elements
of the Safari Zone sub-area from Pokemon Blue (1998).
The first generation of Pokemon games were developed for the Nintendo Game Boy by Game Freak (https://www.gamefreak.co.jp/) and published by Nintendo (https://www.nintendo.com). Pokemon as a property is owned by The Pokemon Company (https://www.pokemon.co.jp/).
nameCharacter. Player's name.
stepsNumeric. Steps remaining (500 at start).
ballsNumeric. Safari Balls remaining (30 at start).
capturesNumeric. Count of wild Pokemon captured (0 at start).
bills_pcDataframe. Details of wild Pokemon caught (empty at start).
new()Create a new Safari Zone object.
safari_zone$new()
A SafariZone-class object.
print()Create a new Safari Zone print method.
safari_zone$print()
A console message with steps and balls remaining.
\dontrun{
x <- safar6::safari_zone$new() # initialise class
x$print() # print the object, see stats
}
pause()Simulate the pause function from the original game.
safari_zone$pause()
A console message with steps and balls remaining.
\dontrun{
x <- safar6::safari_zone$new() # intialise class
x$pause() # 'pause' the game, see stats
}
step()Take a step in the Safari Zone.
safari_zone$step()
Either nothing, or a wild encounter.
\dontrun{
x <- safar6::safari_zone$new() # initialise class
x$step() # take step, prints steps remaining
}
clone()The objects of this class are cloneable with this method.
safari_zone$clone(deep = FALSE)
deepWhether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Not run: x <- safar6::safari_zone$new()
## ------------------------------------------------
## Method `safari_zone$print`
## ------------------------------------------------
## Not run:
x <- safar6::safari_zone$new() # initialise class
x$print() # print the object, see stats
## End(Not run)
## ------------------------------------------------
## Method `safari_zone$pause`
## ------------------------------------------------
## Not run:
x <- safar6::safari_zone$new() # intialise class
x$pause() # 'pause' the game, see stats
## End(Not run)
## ------------------------------------------------
## Method `safari_zone$step`
## ------------------------------------------------
## Not run:
x <- safar6::safari_zone$new() # initialise class
x$step() # take step, prints steps remaining
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.