computerPlayerUNO: Computer Player for UNO

Description Usage Arguments Details Value Author(s) References

Description

Very stupid - random - computer player for UNO

Usage

1
2
3
	computerPlayerUNO(ws, 
                    hand, 
                    card_played)

Arguments

ws

workspace object, that is used in the whole program

hand

A vector of cards, which the player holds in his hand.

card_played

A string, which indicates the latest played card.

Details

This function will be called in the playUno() function. Please feel free to write your own computer player and assign the new function to playUno() with the parameter computerPlayerFunction='yourComputerPlayer'! The computerplayer does not have to say "UNO". The value can just be changed.

Value

A list of two named strings,

selected_card

A string for the card, the player selected from his hand and has to be removed from his hand.

played_card

A string for the card, the player plays. Especially for color-selection cards (rybg), a color-rybg string has to be returned. If no card is played "NO" is returned. Usual cards are in format "color-value".

Author(s)

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

References

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


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