dd.net
Class ObserverClient
java.lang.Object
dd.net.NetClient
dd.net.TurnClient
dd.net.ObserverClient
- All Implemented Interfaces:
- Chat, Client, java.lang.Runnable
- public class ObserverClient
- extends TurnClient
This is a turn client that is incapable of taking game actions,
suitable for instructors and other lurkers.
- Author:
- Seth McGinnis
Methods inherited from class dd.net.NetClient |
addHandler, discoverVenues, getClientName, getReader, gotChatMessage, handleMessage, isRunning, main, run, sendMessage, setChatClient, setClientName, setGame, setUI, startRunning, stopRunning, waitUntilReady |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObserverClient
public ObserverClient(UI ui,
java.lang.String serverName)
throws java.lang.Exception
endBriefing
public void endBriefing()
- Overrides:
endBriefing
in class TurnClient
randomProposal
public void randomProposal()
- Overrides:
randomProposal
in class TurnClient
joinGame
public void joinGame(java.lang.String playerName,
int playerRequest)
- Overrides:
joinGame
in class TurnClient
createNewGame
public void createNewGame(java.lang.String gameName)
- Overrides:
createNewGame
in class TurnClient
withdraw
public void withdraw(java.lang.String proposalID)
- Overrides:
withdraw
in class TurnClient
amend
public void amend(Proposal prop)
- Overrides:
amend
in class TurnClient
callForVote
public void callForVote(java.lang.String proposalID)
- Overrides:
callForVote
in class TurnClient
vote
public void vote(int vote)
- Overrides:
vote
in class TurnClient
votingTimerExpired
public void votingTimerExpired()
- Overrides:
votingTimerExpired
in class TurnClient
sendChatMessage
public void sendChatMessage(java.lang.String user,
java.lang.String message)
- Description copied from class:
TurnClient
- This overrides the Chat interface in NetClient to include
role information in the chat message. NetClient implements
this method when the user sends a chat message. Chat messages
in DLUG should include role information as part of the chat. This
overrieds that behavior by appending the role information to
the user name.
- Specified by:
sendChatMessage
in interface Chat
- Overrides:
sendChatMessage
in class TurnClient
- Parameters:
user
- user sending the chat messagemessage
- the chat message that needs to be sent