A C D E F G H I J L M N P R S T U W

A

ADD_USER - Static variable in interface Room
 
addNewClient(Client) - Method in class GameRoom
Adds a new client to the set of current clients If the client is the first to be added to the room that client is set as the first illustrator Sends a message to each client in the game room giving the name of the new client format of message: 101_userName_
addNewClient(Client) - Method in class MainRoom
Adds a new client to the set of current clients Starts a new thread that waits for another client
addNewClient(Client) - Method in interface Room
Adds a new client to the room

C

canJoin() - Method in class GameRoom
Determines whether a client can join the game room.
CHAT - Static variable in interface Room
 
Client - Class in <Unnamed>
Holds personal information needs to communicate with a given client.
Client(Socket) - Constructor for class Client
initializes an output stream to the client
close() - Method in class Scanner
Closes this scanner.
COLOR_CHANGE - Static variable in interface Room
 
containsUser(String) - Method in class GameRoom
Checks to see if a given user is in the room.
containsUser(String) - Method in class MainRoom
Checks to see if a given user is in the room.
containsUser(String) - Method in interface Room
Checks to see if a given user is in the room.
CREATE - Static variable in interface Room
 

D

DRAW - Static variable in interface Room
 

E

END_SESSION - Static variable in interface Room
 
endGame() - Method in class GameState
Ends the game
ERASE - Static variable in interface Room
 
ERROR - Static variable in interface Room
 

F

findUser(String) - Method in class GameRoom
Looks through the array for a user.

G

GAME_INFO - Static variable in interface Room
 
GameRoom - Class in <Unnamed>
This is the GameRoom state that keeps track of a game's information and any messages that need to be relayed between clients in a game.
GameRoom(MainRoom) - Constructor for class GameRoom
Construct the GameRoom
GameRoom(Client, MainRoom) - Constructor for class GameRoom
Construct the GameRoom and specify a Client as illustrator.
GameState - Class in <Unnamed>
Keeps track of the state of the game Generates random topics from a file
GameState() - Constructor for class GameState
Constructs a GameState
getGameMode() - Method in class GameRoom
Returns the current game mode.
getGameMode() - Method in class GameState
Gets the current game mode
getIllustrator() - Method in class GameRoom
Returns the currrent illustrator.
getMsg(String) - Static method in class MessageParser
Gets the part of a string after the first '_' Use to get the message
getNumPlayers() - Method in class GameRoom
Gets the number of players in the game room
getStackTraceAsString(Throwable) - Static method in class Scanner
 
getTag(String) - Static method in class MessageParser
Gets the tag of a message by splitting it by the '_' character
getTopic() - Method in class GameState
Gets a random topic and stores that for when the game starts
getUserName() - Method in class Client
Gets the user name of the client

H

handleMsg(String, Client) - Method in class GameRoom
Handles Messages from the client
handleMsg(String, Client) - Method in class MainRoom
Handles messages from client
handleMsg(String, Client) - Method in interface Room
Handles a message from the client.
hasNext() - Method in class Scanner
Returns true if this scanner has another token in its input.
hasNextBigDecimal() - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a BigDecimal using the nextBigDecimal() method.
hasNextBigInteger() - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a BigInteger in the default radix using the nextBigInteger() method.
hasNextBigInteger(int) - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a BigInteger in the specified radix using the nextBigInteger() method.
hasNextBoolean() - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a boolean value.
hasNextByte() - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a byte value in the default radix using the nextByte() method.
hasNextByte(int) - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a byte value in the specified radix using the nextByte() method.
hasNextDouble() - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a double value using the nextDouble() method.
hasNextFloat() - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a float value using the nextFloat() method.
hasNextInt() - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as an int value in the default radix using the nextInt() method.
hasNextInt(int) - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as an int value in the specified radix using the nextInt() method.
hasNextLine() - Method in class Scanner
Returns true if there is another line in the input of this scanner.
hasNextLong() - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a long value in the default radix using the nextLong() method.
hasNextLong(int) - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a long value in the specified radix using the nextLong() method.
hasNextShort() - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a short value in the default radix using the nextShort() method.
hasNextShort(int) - Method in class Scanner
Returns true if the next token in this scanner's input can be interpreted as a short value in the specified radix using the nextShort() method.

I

IN_GAME - Static variable in class GameState
 
inHasMethod() - Static method in class Scanner
 
ioException() - Method in class Scanner
Returns the IOException last thrown by this Scanner.

J

JOIN - Static variable in interface Room
 

L

LEAVE_GAME - Static variable in interface Room
 
LINE_RETURN - Static variable in class Client
 
LOGIN - Static variable in interface Room
 
LOGOUT - Static variable in interface Room
 

M

main(String[]) - Static method in class GameState
 
main(String[]) - Static method in class MainRoom
 
MainRoom - Class in <Unnamed>
Main Room for Users This is the main control for the server.
MainRoom() - Constructor for class MainRoom
Construct and initialize the server
MessageParser - Class in <Unnamed>
Parses messages
MessageParser() - Constructor for class MessageParser
 

N

NEW_ILLUSTRATOR - Static variable in interface Room
 
next() - Method in class Scanner
Finds and returns the next complete token from this scanner.
nextBigDecimal() - Method in class Scanner
Scans the next token of the input as a BigDecimal.
nextBigInteger() - Method in class Scanner
Scans the next token of the input as a BigInteger.
nextBigInteger(int) - Method in class Scanner
Scans the next token of the input as a BigInteger.
nextBoolean() - Method in class Scanner
Scans the next token of the input into a boolean value and returns that value.
nextByte() - Method in class Scanner
Scans the next token of the input as a byte.
nextByte(int) - Method in class Scanner
Scans the next token of the input as a byte.
nextDouble() - Method in class Scanner
Scans the next token of the input as a double.
nextFloat() - Method in class Scanner
Scans the next token of the input as a float.
nextInt() - Method in class Scanner
Scans the next token of the input as an int.
nextInt(int) - Method in class Scanner
Scans the next token of the input as an int.
nextLine() - Method in class Scanner
Advances this scanner past the current line and returns the input that was skipped.
nextLong() - Method in class Scanner
Scans the next token of the input as a long.
nextLong(int) - Method in class Scanner
Scans the next token of the input as a long.
nextShort() - Method in class Scanner
Scans the next token of the input as a short.
nextShort(int) - Method in class Scanner
Scans the next token of the input as a short.

P

PORT - Static variable in class ScanIncomingConnections
 

R

radix() - Method in class Scanner
Returns this scanner's default radix.
remove() - Method in class Scanner
The remove operation is not supported by this implementation of Iterator.
REMOVE_USER - Static variable in interface Room
 
removeClient(String) - Method in class GameRoom
Remove a client from the room.
removeClient(String) - Method in class MainRoom
Remove a client from the room.
removeClient(String) - Method in interface Room
Remove a client from the room.
removeGame(GameRoom) - Method in class MainRoom
Removes the given game from the game list
Room - Interface in <Unnamed>
Every type of room where a client can be needs to be able to handle incoming messages.
run() - Method in class Client
Overrided run method that listens for incoming messages from the client.
run() - Method in class ScanIncomingConnections
Overrided run method that goes when this thread is started

S

ScanIncomingConnections - Class in <Unnamed>
Scans for incoming connections to the server When is receives a connection is creates a Client object and passes it to the MainRoom.
ScanIncomingConnections(MainRoom) - Constructor for class ScanIncomingConnections
Constructs a scanning object that waits for incoming connections
Scanner - Class in <Unnamed>
A simple text scanner which can parse primitive types and strings using regular expressions.
Scanner(File) - Constructor for class Scanner
Constructs a new Scanner that produces values scanned from the specified file.
Scanner(InputStream) - Constructor for class Scanner
Constructs a new Scanner that produces values scanned from the specified input stream.
Scanner(Reader) - Constructor for class Scanner
Constructs a new Scanner that produces values scanned from the specified source.
Scanner(String) - Constructor for class Scanner
Constructs a new Scanner that produces values scanned from the specified string.
sendMsg(String) - Method in class Client
Sends a message to a client
sendTo(String, String) - Method in class GameRoom
Sends a given message to a given user
sendTo(String, String) - Method in class MainRoom
Sends a given message to a given client
sendToAllClients(String) - Method in class GameRoom
Sends a message to all clients.
sendToAllClients(String) - Method in class MainRoom
Sends a message to all clients
sendToAllOthers(Client, String) - Method in class GameRoom
Sends a given message to all clients in the room except for the sender
setRoom(Room) - Method in class Client
 
setUserName(String) - Method in class Client
Sets the user name
SIZE_CHANGE - Static variable in interface Room
 
START - Static variable in interface Room
 
startGame() - Method in class GameState
Starts the game
STOP - Static variable in interface Room
 

T

TOPIC_FILE_NAME - Static variable in class GameState
 
TOPIC_REQUEST - Static variable in interface Room
 
toString() - Method in class Scanner
Returns the string representation of this Scanner.

U

useRadix(int) - Method in class Scanner
Sets this scanner's default radix to the specified radix.

W

WAITING_FOR_PLAYERS - Static variable in class GameState
 

A C D E F G H I J L M N P R S T U W