Global Positioning System Reference
In-Depth Information
Running random client players. The client batch file is easier to adapt,
since the policies are not used to run on the same computer as the server.
The batch file
... \london.roa\client\RandomPlayer.bat
is a regular Java invocation with two parameters (separated by a space!).
Please replace the absolute paths in this batch file to reflect your envi-
ronment, open a second console, and run the batch. By placing the two
windows next to each other, the client-server dialog can be observed:
server> notifyActors: Game will start in 15 seconds ...
client> STARTGAME Game will start in 15 seconds ...
server> ********** round: 1 **********
client> round/player/station=1/0/134
The maximum duration of the scenario is roughly defined in the ROApp.props
file:
secondsPerMove x nrOfRounds = 60 x 22 = 22 minutes
Note that the server is not terminating after TerminatingGame... and
has to be killed manually.
The main method of the RandomPlayer client makes use of a player fac-
tory for development purposes. Many clients can be created with this one
method to test the server's behavior for various combinations of clients.
Of course, the server and client can also be launched from an IDE. In
order to set the RMI policy and command-line parameters, they have to
be added to the \Run congurations ..." (i.e., in Eclipse) in the elds
\Program arguments" and \VM arguments."
Now everything is set to run the application on two JVMs and to modify
the code for a clear view of the scenario.
13.2.2 Distributed Programming and Deployment
The concept is simple. First the server software is set up. Then each
programmer or programmer team is asked to install the client software
(and IDE) and run his personal version of the RandomPlayer as described in
Section 13.4.1. Now, the environment is setup and the games can begin.
Every student can start making his player smarter and join a new game
any time. In this chapter, we collect a small initial TODO list and share it
online at www.roaf.de . The problem statements are enumerated for refer-
ence purposes and most of the implementations can be found in Parts II{IV.
Problem 13.1 (Software distribution.) Separate the packages into four Java
archives: server, common, client, and GUI. Install and run server and
common jars on the server (without client jar). Install and run client and
common jars on the clients (without server jar).
 
Search WWH ::




Custom Search