computerPlayerUNO {gamesNws} | R Documentation |
Very stupid - random - computer player for UNO
computerPlayerUNO(ws, hand, card_played)
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. |
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.
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". |
Markus Schmidberger <schmidb@ibe.med.uni-muenchen.de>, Fabian Grandke
http://gamesnws.r-forge.r-project.org/