Welcome to Play Games with R using the NWS Server Technology!
The R package 'gamesNWS' provides an infrastructure to play different
card games (e.g. uno, poker) in a computer network. You can play the games with your friends
in the whole world or against several computer players at your local machine.
For the communication a NetWorkSpace Server and the R package NWS is used.
Just install a NWS Server, send the login data to your friends and start the game.
How to play a game?
Everyone has to install the 'gamesNWS' and 'NWS' package.
Than a master user (one of the players) is required:
Than all players have to connect to the same server (e.g. a Uno game): playUno('MyGame', serverHost='localhost', user='username')
- First of all you need a running NWS Server. The installation is quite simple: http://nws-r.sourceforge.net/
- A master player has to create the game (e.g. an Uno game): startUnoGame('MyGame', serverHost='localhost')
The rest is quite simple and will be explained during the game.
Example code for UNO:
Start three R sessions
- install.packages("gamesNws", repos="http://R-Forge.R-project.org")
- startUnoGame('exampleWorkSpace', serverHost='localhost', config=c(T,T,T,T))
- playUnoGame('exampleWorkSpace', serverHost='localhost', user='exampleplayer1')
- playUnoGame('exampleWorkSpace', serverHost='localhost', user='exampleplayer2')
Console 2 or 3: In default you will get a GUI.
If you play with the command line, depending on the played card, you can play one of the following commands:
- Enter s to start the game.
- get-info (shows some game-relevant information)
- NO (if you don't want or can't play a card)
- color-value (plays one of your hand cards)
- Provide NWS-Game Server for everyone
- Implement second game: POKER
How to add further games to the 'gamesNWS' package?
The project summary page you can find here.