Serialized Form


Package pictionary.message

Class pictionary.message.GameStatusData extends java.lang.Object implements Serializable

Serialized Fields

connectedPlayers

java.util.List<E> connectedPlayers
All the players participating in the Pictionary game.


gameStatus

int gameStatus
The game's status, equal to one of the status integers in PictionaryGame, for example PictionaryGame.GAME_STARTED.

Class pictionary.message.Message extends java.lang.Object implements Serializable

Serialized Fields

messageType

Message.MessageType messageType
The type of message.


client

java.lang.String client
The client.
This variable can have different meanings depending on the type of message, for example the recipient ID or the sender ID.


messageData

MessageData<T> messageData
The data associated with this message, is null with some message types where data is not needed; for example Message.MessageType.StopGuessing where the message type alone conveys enough information.
See MessageData for details.

Class pictionary.message.MessageData extends java.lang.Object implements Serializable

Serialized Fields

data

java.lang.Object data
The data object.

Class pictionary.message.StartDrawData extends java.lang.Object implements Serializable

Serialized Fields

theWord

java.lang.String theWord
The word the player should attempt to draw.


timeLimit

int timeLimit
The amount of time, in seconds, the player can draw before the time is up.

Class pictionary.message.StatusData extends java.lang.Object implements Serializable

Serialized Fields

connectedClients

java.util.List<E> connectedClients
A List containing the names of the connected clients.


Package pictionary.pictionaryclient

Class pictionary.pictionaryclient.PictionaryClientGUI extends javax.swing.JFrame implements Serializable

Serialized Fields

client

PictionaryClient client
The PictionaryClient that we receive and forward events from/to.


receivedText

javax.swing.JTextArea receivedText
The text area that contains received messages from the server and other clients.


inputArea

javax.swing.JTextArea inputArea
The area where chat text is input.


receivedTextScrollPane

javax.swing.JScrollPane receivedTextScrollPane
The JScrollPane that PictionaryClientGUI.receivedText is attached to.


inputAreaScrollPane

javax.swing.JScrollPane inputAreaScrollPane
The JScrollPane that PictionaryClientGUI.inputArea is attached to.


disconnectOrConnectBtn

javax.swing.JButton disconnectOrConnectBtn
The button used for connecting and disconnecting to/from the server, is initially used for connecting.


connected

boolean connected
True if the client is connected to the server, else false.


joinGameBtn

javax.swing.JButton joinGameBtn
The button used when joining or disconnecting from a game.


sendTextBtn

javax.swing.JButton sendTextBtn
A button that can be used for sending the text in PictionaryClientGUI.inputArea.


guessField

javax.swing.JTextField guessField
The field where the user inputs guesses when playing a game of pictionary.


paper

PictionaryClientGUI.Paper paper
The PictionaryClientGUI.Paper on which the user can draw and also see what other players are drawing.


Package pictionary.pictionaryserver

Class pictionary.pictionaryserver.PictionaryServer extends javax.swing.JFrame implements Serializable

Serialized Fields

clientConnections

java.util.HashMap<K,V> clientConnections
The collection that stores all the client connections. Clients are identified with their unique name.


pictionaryGame

PictionaryGame pictionaryGame
The PictionaryGame instance used by the server.


incomingMessages

java.util.concurrent.LinkedBlockingQueue<E> incomingMessages
The server's queue with incoming messages. Every time a PictionaryServer.ClientConnection receives a message, it puts that message in this queue.


serverSocket

java.net.ServerSocket serverSocket
Responsible for accepting new connections.


serverThread

PictionaryServer.ServerThread serverThread
The PictionaryServer.ServerThread instance used for accepting and creating new client connections.


shutdown

boolean shutdown
True if the server thread is shut down, else false. Used in PictionaryServer.ServerThread.


port

int port
The port on which this server is listening.


host

java.lang.String host
This server's hostname.


disconnectOrConnectBtn

javax.swing.JButton disconnectOrConnectBtn
The button used when starting or shutting down the server.


running

boolean running
True if the server is running, else false. Used by the server's GUI.


wasShutDown

boolean wasShutDown
True if this server has been shut down, else false. Used by the server's GUI.


illegalUsernames

java.util.HashSet<E> illegalUsernames
A collection of usernames that are unavailable.


category

java.lang.String category
The current word category in the Pictionary game.


words

java.util.ArrayList<E> words
The words used in the Pictionary game.