nethack {nethackR}R Documentation

Start a nethack session. This command starts a nethack session with optional NETHACKOPTIONS specified in ... The default nethack() should work fine.

Description

Start a nethack session. This command starts a nethack session with optional NETHACKOPTIONS specified in ... The default nethack() should work fine.

Usage

  nethack(use.telnet = FALSE, use.global = FALSE,
    nethackrc = NA, ...)

Arguments

use.telnet

boolean, whether to dial in to nethack.alt.org or not (default not). Internet required. All other options ignored if this is TRUE.

use.global

whether to use a nethack installed on the user's system (e.g./usr/bin/nethack) rather than the local version. Can be useful for using save files, bones files, etc on the system. Either a boolean TRUE (need nethack in the system $PATH), or a string giving the location of the nethack executable.

nethackrc

a string giving the location of a custom nethackrc file to use, e.g. '~/.nethackrc'. If this is specified then '...' options are ignored.

...

Options to pass into nethack, e.g. name='slartibartfast', role='random', race='dwarf',... See nethackOptions() for more details.

Value

an exit code, 0 on success and non-zero if something bad happened.

Note

On the Rgui interface (the graphics interface for R in Windows), Nethack *cannot* run in the R terminal. Instead, a command prompt window will be launched, in which one can play Nethack.

References

Nethack is an awesome game not written by me. I take no credit for it. This is merely a wrapper around the nethack program. http://www.nethack.org

See Also

nethackOptions

Examples

## Not run: 
 # start a game with a valkyrie named 'slartibartfast',
 #  boulders display with '0', autopickup any money,
 #  and show the turn counter.
 nethack(name='slartibartfast',role='valkyrie',boulder=0,autopickup=TRUE,pickup_types='$',time=TRUE)

 # set of default options I like to use: autopickup money, show turn
 # counter, highlight pet, catname:lolcatz, dogname:Indy
 nethack(autopickup=TRUE,pickup_types='$',time=TRUE,hilite_pet=TRUE,
         catname='lolcatz',dogname='Indy')

## End(Not run)

[Package nethackR version 1.0.1 Index]