playUno: The players play-function

Description Usage Arguments Details Author(s) References Examples

Description

The player calls the function and inputs all necessary values. The function rules the whole course of the UNO-game.

Usage

1
2
3
4
playUno(  name, 
          user = Sys.info()["user"], 
          computerPlayer = FALSE, 
          computerPlayerFunction = computerPlayerUNO, ...)

Arguments

name

Name of the workspace

user

playername

computerPlayer

a logical, if TRUE the player is controlled by computerplayer, else, human controlled

computerPlayerFunction

which computerplayer is used

...

Usual parameters to initialize a netWorkSpace(). See http://nws-r.sourceforge.net/doc/nwsR-1.5.0.pdf (Page 25) for further information

Details

This function rules the whole game course. It asks the player for decisions and shows the relevant information. The funtion shows the last played card, what cards are on your hand, which players are involved and how many card each player has. To control the game options, there are specific commands the player has to use:

say-uno: before playing the second-last card, player has to announce "UNO" get-info: shows some game relevant information color*-value**: the card that should be played(one of the players handcards) NO: if the player isn't able or don't wants to play color*: after playing a rybg-card the player has to name a color, that has to be played next

*one of the "colors"(red,yellow,blue,green,rybg) **one of the "card values"=(0:9,2+,4+,BREAK,BACK)

Author(s)

Markus Schmidberger <schmidb@ibe.med.uni-muenchen.de>, Fabian Grandke

References

http://gamesnws.r-forge.r-project.org/

Examples

1
2
3
4
5
6
7
8
## Not run: 
	playUno("test",user="tom",serverHost="localhost")

## End(Not run)
## Not run: 
  playUno("test2",user="paul",computerPlayer=TRUE)

## End(Not run)

gamesNws documentation built on May 2, 2019, 6:13 p.m.

Related to playUno in gamesNws...