dualroids
Class Client
java.lang.Object
|
+--dualroids.Client
- All Implemented Interfaces:
- Runnable
- public class Client
- extends Object
- implements Runnable
The helper class for running Client threads.
Constructor Summary |
Client(String hostname,
boolean local,
String playerName)
Saves the hostname , local and
playerName fields. |
Method Summary |
void |
run()
JVM calls this method when the client thread is started with the
start() method call. |
void |
setVisible()
This method gets rid of the setup screen windows and shows the
main game window. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
hostname
private String hostname
- the host name to connect the client to
local
private boolean local
- whether the client is local to the server or not
gameFrame
private GameFrame gameFrame
- the main game frame
playerName
private String playerName
- the player's name of this client
Client
public Client(String hostname,
boolean local,
String playerName)
- Saves the
hostname
, local
and
playerName
fields.
- Parameters:
hostname
- the host name to connect the client tolocal
- whether the client is local to the server or notplayerName
- the player's name of this client
run
public void run()
- JVM calls this method when the client thread is started with the
start()
method call. First the network connections are
initialized by creating a client model connector and then the main
game window is initialized.
- Specified by:
run
in interface Runnable
setVisible
public void setVisible()
- This method gets rid of the setup screen windows and shows the
main game window.
Dualroids was written by Oskar Ojala, Yrjö Kari-Koskinen and Henri Sivonen