A B C D E F G H I J K L M N O P R S T U V W Y

A

accept(File) - Method in class ExampleFileFilter
Return true if this file should be shown in the directory pane, false if it shouldn't.
actionPerformed(ActionEvent) - Method in class FileDialog
The actionPerformed method responds to action events generated by the buttons on the JDialog.
actionPerformed(ActionEvent) - Method in class MultiplayerDialog
The actionPerformed method responds to action events generated by the buttons on the JDialog.
actionPerformed(ActionEvent) - Method in class SGui
Handles the events passed to the Sokoban class ActionListener.
actionPerformed(ActionEvent) - Method in class Time
Required for the ActionListener interface.
add(Move) - Method in class MoveTracker
Adds the inputed move to the moveTracker Vector.
addColumns() - Method in class LevelEditorUI
Adds the columns to the main JTable and sets column attributes.
addExtension(String) - Method in class ExampleFileFilter
Adds a filetype "dot" extension to filter against.
addHighScore(HighScore) - Method in class HighScoresList
The addScores method allows the user to add scores to the high scores list.
addKeyMonitor() - Method in class SGui
Adds a KeyMonitor
addLevel(String) - Method in class CustomLevelOrder
This function allows the user to add custom level(s) to level list.
addMove(Move) - Method in class Robot
Adds the inputed move to the Robot's moveTracker and adjusts the robots location.
addRobot(Robot) - Method in class Map
Adds a Robot to the robot vector.
addSideBar() - Method in class LevelEditorUI
Adds the sideBar to the main panel.
addText(String) - Method in class SGui
Displays the passed text in the chat window
addUser(String, int) - Method in class Server
Creates an add user command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.

B

BLUE - Static variable in class RobotColor
 

C

calcScore(int) - Method in class Robot
Calculates and returns the score.
calculateScore(int) - Method in class Map
An algorithm will compute a score using a combination of game variables.
cancel - Variable in class MultiplayerDialog
Allows the user to stop connecting or hosting the new multiplayer game.
cancelDialog() - Method in class MultiplayerDialog
Stops the connectTimer, ends the game and hides the multiplayer connection dialog.
CellRenderer - class CellRenderer.
The CellRenderer class is a display of one square within a map in the level editor's JTable.
CellRenderer() - Constructor for class CellRenderer
Constructor to initialize the CellRenderer.
changeLevel(String) - Method in class Game
Processes a request to change the current level being played.
changeLevel(String) - Method in class Map
Player choses a different level map to play.
chatInput - Variable in class SGui
 
chatPanel - Variable in class SGui
 
chatText - Variable in class SGui
 
checkChangeLevelVotes(String) - Method in class Game
Checks to see if the change level vote has completed.
checkRestartVotes() - Method in class Game
Checks to see if the restart level vote has completed.
clear() - Method in class MoveTracker
Resets the moveTracker to an empty value.
clearHighScores() - Method in class HighScoresList
The clearHighScores method allows the user to clear the current list of high scores.
Client - class Client.
The Client class is a communications interface for an individual user who wants to join a multiplayer game of Sokoban.
Client(Game, String, int) - Constructor for class Client
Client constructor
connectionClosed() - Method in class Game
Informs the multiplayer dialog to display a connection closed dialog message.
connectionClosed() - Method in class MultiplayerDialog
Shows a dialog informing user of that the connection with the server has been closed.
connectIP - Variable in class MultiplayerDialog
The text field input box to get the ip to connect to.
connectPort - Variable in class MultiplayerDialog
The text field input box to get the port to connect to.
connectTimer - Variable in class MultiplayerDialog
A Timer that waits to see if the client has connected; used by the attempting to connect dialog.
Constants - class Constants.
Constants is a set of globally defined constants.
Constants() - Constructor for class Constants
 
continueButton - Variable in class SGui
 
couldNotConnect() - Method in class MultiplayerDialog
Shows a dialog informing user of that the connection with the server could not be established.
CRATE - Static variable in class Square
 
CustomLevelOrder - class CustomLevelOrder.
CustomLevelOrder is a user defined order of the custom created levels.
CustomLevelOrder() - Constructor for class CustomLevelOrder
Constructor - initializes the CustomLevelOrder attributes

D

debugMode - Static variable in class SGui
The debug flag signifying if the game should return time accurately or always 1.
Direction - class Direction.
The Direction class extends the Enumerate class and represents the four directions a Robot can move on a map.
Direction(String) - Constructor for class Direction
Constructor - calls the constructor of the Enumerate class that Direction inherits.
disconnect() - Method in class Client
Sends a disconnect message to the server.
doChangeLevel(String) - Method in class Game
Tells the map class to load the level passed.
doRestartMap() - Method in class Game
Perform the restart map operation.
DOWN - Static variable in class Direction
 

E

EMPTY - Static variable in class Square
 
endGame() - Method in class Game
Closes any connection that is present and clears the map.
endGame() - Method in class SGui
Ends the game and stops the statsMonitor Timer.
ExampleFileFilter - class ExampleFileFilter.
A convenience implementation of FileFilter that filters out all files except for those type extensions that it knows about.
ExampleFileFilter() - Constructor for class ExampleFileFilter
Creates a file filter.
ExampleFileFilter(String) - Constructor for class ExampleFileFilter
Creates a file filter that accepts files with the given extension.
ExampleFileFilter(String[]) - Constructor for class ExampleFileFilter
Creates a file filter from the given string array.
ExampleFileFilter(String[], String) - Constructor for class ExampleFileFilter
Creates a file filter from the given string array and description.
ExampleFileFilter(String, String) - Constructor for class ExampleFileFilter
Creates a file filter that accepts the given file type.

F

FileDialog - class FileDialog.
The FileDialog class is the set of dialog boxes used for displaying currently saved games for saving and loading.
FileDialog(SGui, Game) - Constructor for class FileDialog
Constructor - initializes the member variables and sets up the keylistener.

G

game - Variable in class MultiplayerDialog
The link to the Sokoban game interface.
Game - class Game.
The Game Class is the central core of the the Sokoban game.
Game(SGui) - Constructor for class Game
Constructor - initializes the game class
gameEndGame - Variable in class SGui
 
gameExit - Variable in class SGui
 
gameHighScores - Variable in class SGui
 
gameLevelEditor - Variable in class SGui
 
gameLoad - Variable in class SGui
 
gameMenu - Variable in class SGui
 
gameNewGame - Variable in class SGui
 
gameNewMultiplayerGame - Variable in class SGui
 
gameNewSoloGame - Variable in class SGui
 
gameOptChange - Variable in class SGui
 
gameOptions - Variable in class SGui
 
gameSave - Variable in class SGui
 
getChangeLevelFlag() - Method in class Robot
Returns the changeLevel flag for the robot signifying if the user wants to change the level or not.
getCol() - Method in class Robot
Returns the current column location of the robot.
getColor() - Method in class Robot
Returns the current color of the robot
getColor() - Method in class RobotColor
Returns the current color
getColumnCount() - Method in class Level
Used by the JTable display to determine the number of columns.
getCratesIncinerated() - Method in class Robot
Returns the number of crates that have been incinerated by this robot in the current game.
getCurrentLevel() - Method in class CustomLevelOrder
Returns the name of the current level in the list
getCurrentLevel() - Method in class Game
Returns the name of the current level being played
getCurrentStep() - Method in class Tutorial
Returns the number of the current step.
getDescription() - Method in class ExampleFileFilter
Returns the human readable description of this filter.
getDescription() - Method in class Tutorial
Returns an array of Strings describing the current step.
getDirection() - Method in class Move
Returns the direction of the move that just occured.
getDirectionFaced() - Method in class Robot
Returns the direction that the robot is facing in the current game.
getEditor() - Method in class LevelEditorUI
Returns the current level being edited
Pre ConditionNone
Post ConditionNone
getExtension(File) - Method in class ExampleFileFilter
Return the extension portion of the file's name .
getFirstLevel() - Method in class Game
Returns the name of the first level in the level list.
getIP() - Method in class Client
Returns the ip address to connect to.
getLastStep() - Method in class Tutorial
Sets the current step to the previous step and then calls loadStep.
getLevelList() - Method in class CustomLevelOrder
Returns a String array of the level names in the current customLevelOrder list
getLevelList() - Method in class Game
Returns a String array of the names of the levels in the level list.
getLevelName() - Method in class Level
Returns the level name.
getLevelName() - Method in class MultiplayerDialog
Returns the name of the level selected in the levelList JList
getLocalRobot() - Method in class Game
Returns the local Robot
getMap() - Method in class Game
Returns the current Map.
getMap() - Method in class Map
Returns a 2-dimensional array containing the Squares representing the current map.
getMapString() - Method in class Game
Returns the current Map.
getMaxCon() - Method in class Server
Returns the maximum number of connections allowed.
getMoves() - Method in class Robot
Returns the number of moves that have been taken by this robot in the current game.
getMoveTracker() - Method in class MoveTracker
Returns an array of the moves within the moveTracker Vector
getMoveTracker() - Method in class Robot
Returns an array of the moves within the MoveTracker
getName() - Method in class HighScore
Returns the user's name
getNextLevel() - Method in class CustomLevelOrder
Returns the name of the next level in the list
getNextLevel() - Method in class Game
Returns the name of the next level.
getNextStep() - Method in class Tutorial
Sets the current step to the next step and then calls loadStep.
getPort() - Method in class Client
Returns the port to connect to.
getPort() - Method in class Server
Returns the number of the port to listen on.
getPrevLevel() - Method in class CustomLevelOrder
Returns the name of the previous level in the list
getPrevLevel() - Method in class Game
Returns the name of the previous level.
getPushes() - Method in class Robot
Returns the number of pushes that this robot has done in the current game.
getRestartFlag() - Method in class Robot
Returns the restart flag for the robot signifying if the user wants to restart the level or not.
getRobot(int) - Method in class Map
Removes the Robot with a robotNumber equal to the passed robotNum from the robot vector.
getRobotNumber() - Method in class Client
Returns the robot number of this client.
getRobotNumber() - Method in class Robot
Returns which robot this is.
getRobots() - Method in class Game
Returns the robots currently in the map
getRobots() - Method in class Map
Returns an array of the Robots on the map.
getRow() - Method in class Robot
Returns the current row location of the robot.
getRowCount() - Method in class Level
Returns the number of rows in the map.
getSaveDescriptions() - Static method in class Game
Returns a String array containing the save game descriptions.
getScore() - Method in class HighScore
Returns the user's score
getScore() - Method in class Robot
Returns the current score associated with this robot.
getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int) - Method in class CellRenderer
Changes the ImageIcon being displayed by the CellRenderer.
getThreadNum() - Method in class ServerThread
Returns the thread number of this connection.
getThreadNums() - Method in class Server
Returns the thread numbers of each ServerThread in the clients vector.
getTime() - Method in class Game
Returns the cumulative time spent on solving the current map (in seconds).
getTime() - Method in class Map
Returns the current time spent solving the map in seconds.
getTime() - Method in class Time
Returns the current time in seconds.
getTotalScore() - Method in class Game
Returns the current totalScore
getUserName() - Method in class Game
Returns the current username
getUserName() - Method in class Robot
Returns the user name of the robot.
getUserName() - Method in class ServerThread
Returns the user name of the client connected.
getValueAt(int, int) - Method in class Level
Returns the Square located at the row and column passed.
graphicsPath - Static variable in class Constants
The directory path to where the graphics are stored.
GREEN - Static variable in class RobotColor
 
gSizeX - Static variable in class Constants
the size of the square graphics in the x direction.
gSizeY - Static variable in class Constants
the size of the square graphics in the y direction.
gui - Variable in class Game
The link to the Sokoban user interface.

H

hasCrateMoved() - Method in class Move
Returns whether or not the crate was moved in the move.
hasRobotMoved() - Method in class Move
Returns whether or not the robot was moved in the move.
helpAbout - Variable in class SGui
 
helpHost - Variable in class MultiplayerDialog
The JButton that displays the host game help.
helpHostFile - Static variable in class Constants
the String file name for the host game instructions.
helpInstructions - Variable in class SGui
 
helpJoin - Variable in class MultiplayerDialog
The JButton that displays the join game help.
helpJoinFile - Static variable in class Constants
the String file name for the join game instructions.
helpLevelEditorFile - Static variable in class Constants
The String file name for the level editor help file
helpMenu - Variable in class SGui
 
helpPath - Static variable in class Constants
The directory path to where the help files are stored.
helpTutorial - Variable in class SGui
 
HighScore - class HighScore.
HighScore is a score obtained by a user which is high enough to be amongst the top 15 scores.
HighScore(String, int) - Constructor for class HighScore
Constructor for the Score Class
HighScoresList - class HighScoresList.
The HighScoresList class is a list of the top 15 scores achieved during the play of Sokoban.
HighScoresList(boolean) - Constructor for class HighScoresList
Constructor - initializes the scores vector.
HighScoresList(Game) - Constructor for class HighScoresList
Constructor - initializes the scores vector.
hostGame - Variable in class MultiplayerDialog
The JButton that starts the host game setup.

I

INCINERATOR - Static variable in class Square
 
insertLevel(int, String) - Method in class CustomLevelOrder
This function allows the user to add custom level(s) to level list.
instantReplay() - Method in class Game
Sends instantReplay message to the Map class
Precondition: The game is in single player mode.
instantReplay() - Method in class Map
Shows the sequence of movements a robot has taken up to the current point in the level.
instructionsFile - Static variable in class Constants
the String file name for the instructions.
Intro - class Intro.
The Intro class is the JPanel displaying the Sokoban introduction.
Intro(SGui) - Constructor for class Intro
Constructor - sets the Intro panel's background to black to match the animated GIF.
isActive() - Method in class Game
Returns whether the game is active or not.
isClientConnected() - Method in class Game
Indicates whether or not the client is connected to a multiplayer game.
isConnected() - Method in class Client
Returns true if a connection to a server exists and false if a connection to a server doesn't exist.
isEmpty() - Method in class CustomLevelOrder
Returns true if the customLevelOrder Vector is empty and false if not
isEmpty() - Method in class MoveTracker
Checks to see if the moveTracker Vector is empty or not
isExtensionListInDescription() - Method in class ExampleFileFilter
Returns whether the extension list (.jpg, .gif, etc) should show up in the human readable description.
isHosting() - Method in class Game
Indicates whether or not the client is connected to a multiplayer game.
isLoaded() - Method in class FileDialog
Returns whether or not the game was successfully loaded.
isMultiplayer() - Method in class Game
Indicates whether or not the game is a multiplayer game.
isPaused() - Method in class Game
Returns true if the map is currently paused, false otherwise.
isPaused() - Method in class Map
Returns true if the map is currently paused, false otherwise.
isPaused() - Method in class Time
Returns the true if the time is paused, otherwise false.
isSaved() - Method in class FileDialog
Returns whether or not the game was successfully saved.

J

joinGame - Variable in class MultiplayerDialog
The JButton that starts the join game.

K

keyboardListener - Variable in class SGui
Instance of KeyMonitor to listen to keyboard commands to control the robot while the game is being played.
keyPressed(KeyEvent) - Method in class FileDialog
Responds to the ESCAPE key being pressed to close the window.
keyPressed(KeyEvent) - Method in class Intro
keyPressed is the method required by KeyListener to respond to key presses.
keyPressed(KeyEvent) - Method in class MultiplayerDialog
Responds to the ESCAPE key being pressed to close the window.
keyReleased(KeyEvent) - Method in class FileDialog
Empty method: required by keylistener.
keyReleased(KeyEvent) - Method in class Intro
Empty Method: Required by the KeyListener.
keyReleased(KeyEvent) - Method in class MultiplayerDialog
Empty method: required by keylistener.
keyTyped(KeyEvent) - Method in class FileDialog
Empty method: required by keylistener.
keyTyped(KeyEvent) - Method in class Intro
Empty Method: Required by the KeyListener.
keyTyped(KeyEvent) - Method in class MultiplayerDialog
Empty method: required by keylistener.

L

lastElement() - Method in class MoveTracker
Returns the last move in the moveTracker Vector
LEFT - Static variable in class Direction
 
level - Variable in class Map
The name of the level.
level - Variable in class MultiplayerDialog
The name of the level to be played.
Level - class Level.
The Level class is a tool used by the user to create custom levels for use in the game.
Level() - Constructor for class Level
Constructor - initializes the Square[][] board.
levelCompleted() - Method in class Game
This function tells the system that level has been completed and to therefore proceed to next level.
levelEditorExit - Variable in class SGui
 
levelEditorHelpInstructions - Variable in class SGui
 
levelEditorHelpMenu - Variable in class SGui
 
levelEditorLevelMenu - Variable in class SGui
 
levelEditorLoad - Variable in class SGui
 
levelEditorNew - Variable in class SGui
 
levelEditorOrg - Variable in class SGui
 
levelEditorSave - Variable in class SGui
 
LevelEditorUI - class LevelEditorUI.
The LevelEditorUI class is a graphical interface used by the LevelEditor to allow the user to create custom levels for use in the game.
LevelEditorUI() - Constructor for class LevelEditorUI
Constructor - initializes the JTable and the main display jpanel.
levelExt - Static variable in class Constants
the String file name extension for level files.
levelGoTo - Variable in class SGui
 
levelList - Static variable in class Constants
The directory path to where the level list is stored.
levelList - Variable in class MultiplayerDialog
The JList that contains the list of levels.
levelMenu - Variable in class SGui
 
levelNext - Variable in class SGui
 
levelPath - Static variable in class Constants
The directory path to where the levels are stored.
levelPause - Variable in class SGui
 
levelPrevious - Variable in class SGui
 
levelReplay - Variable in class SGui
 
levelRestart - Variable in class SGui
 
levels - Variable in class MultiplayerDialog
A string list of the levels available to be played.
levelScore - Variable in class SGui
 
levelUndo - Variable in class SGui
 
loadGame() - Method in class SGui
Show the load game dialog box.
loadGame(int) - Method in class Game
This function allows the user to load a game from a previously saved game
Precondition:none
Postcondition:The previously played game is loaded and the map is set to the saved state
loadHighScores() - Method in class HighScoresList
The loadHighScores method allows the user to load the scores from a file.
loading - Variable in class Map
The boolean to let sounds know if the game is loading or not
loadLevel(String) - Method in class LevelEditorUI
Loads a level into the main editing window to be edited.
loadMainMenu() - Method in class SGui
Change the topPanel to display the main menu.
loadStep() - Method in class Tutorial
Loads the current step's description and moves.

M

main(String[]) - Static method in class Sokoban
Initializes and displays the window.
mainHighScores - Variable in class SGui
 
mainLevelEditor - Variable in class SGui
 
mainMulti - Variable in class SGui
 
mainSolo - Variable in class SGui
 
Map - class Map.
The Map class represents the environment in which the robot will be able to move around in.
Map(Game) - Constructor for class Map
Creates a new Map object with given coordinates of crates, walls and incinerators.
mapDisplay - Variable in class SGui
The display panel where the MapRenderer will be drawn.
MapRenderer - class MapRenderer.
The MapRenderer class is a graphical representation of the current state of the map.
MapRenderer() - Constructor for class MapRenderer
Constructor of MapRenderer - inits the point to the Game class and sets the size and the background color of the JPanel.
maxCol - Static variable in class Constants
the maximum number of columns in a map.
maxRow - Static variable in class Constants
the maximum number of rows in a map.
maxSaves - Static variable in class Constants
the maximum number of saved games.
menuBar - Variable in class SGui
 
mouseClicked(MouseEvent) - Method in class Intro
Empty Method: Required by the MouseListener.
mouseEntered(MouseEvent) - Method in class Intro
Empty Method: Required by the MouseListener.
mouseExited(MouseEvent) - Method in class Intro
Empty Method: Required by the MouseListener.
mousePressed(MouseEvent) - Method in class Intro
mousePressed is the method required by MouseListener to respond to mouse presses.
mouseReleased(MouseEvent) - Method in class Intro
Empty Method: Required by the MouseListener.
Move - class Move.
The Move class represents a move made by the robot on a map.
Move(Direction, boolean, boolean, boolean) - Constructor for class Move
Constructor for the Move Class
moveRobot(int, Direction) - Method in class Map
Moves the robot in the direction passed.
MoveTracker - class MoveTracker.
The MoveTracker class is a data structure that contains a dynamic list of the moves a robot has made.
MoveTracker() - Constructor for class MoveTracker
Initializes the moveTracker Vector
MultiplayerDialog - class MultiplayerDialog.
The MultiplayerDialog class is the set of dialog boxes displayed when a multiplayer game is running.
MultiplayerDialog(SGui, Game) - Constructor for class MultiplayerDialog
Constructor - sets up and displays the multiplayer dialog box.
multiResX - Static variable in class Constants
the x coordinate of the multiplayer window size.
multiResY - Static variable in class Constants
the y coordinate of the multiplayer window size.
myIP - Variable in class MultiplayerDialog
The text field input box that displays the host's ip

N

newLevel() - Method in class LevelEditorUI
Creates an empty level in the editing window.
normalResX - Static variable in class Constants
the x coordinate of the normal window size.
normalResY - Static variable in class Constants
the y coordinate of the normal window size.

O

owner - Variable in class Intro
The link to the Sokoban user interface.
owner - Variable in class MultiplayerDialog
The link to the Sokoban user interface.

P

paintComponent(Graphics) - Method in class Intro
Paints the JPanel, drawing the introduction animation in the middle of the window.
paintComponent(Graphics) - Method in class MapRenderer
Paints the JPanel, drawing the necessary images to present an accurate graphical representation of the current map.
pauseGame() - Method in class SGui
Disable the UI buttons not available during a pause game.
pauseScreen - Variable in class SGui
The pause screen message.
pauseTimer() - Method in class Game
Sends pauseTimer message to the Map class
Precondition: The game is not multiplayer
Postcondition: The timer is paused.
pauseTimer() - Method in class Map
Pauses the timer.
playBurnSound() - Static method in class Sound
Plays the sound used when a crate is pushed into an incinerator
playDoneSound() - Static method in class Sound
Plays the sound associated with finishing a level
playMoveSound() - Static method in class Sound
Plays the moving sound
playPushSound() - Static method in class Sound
Plays the sound used when pushing a crate
postAcceptedChangeLevel(String, int, boolean) - Method in class Game
Sets a robot's change level flag to the accepted boolean passed.
postAcceptedRestart(int, boolean) - Method in class Game
Sets a robot's restart level flag to the accepted boolean passed.
postChat(String, String) - Method in class Game
This function displays the chat messages sent by the users.
postCommand(String) - Method in class Client
Sends the command to the server.
postDisconnect(int) - Method in class Game
Informs other users connected to a server of a client disconnecting and removes the client's robot from the map
postMove(int, Direction) - Method in class Game
This function posts the move made by the user on the map.
postNewUser(String, int) - Method in class Game
Adds a user to the current game.
processCommand(String) - Method in class Client
Checks the command received from the server and determines what to do with the information
processCommand(String) - Method in class ServerThread
Checks the command received from the client and determines what to do with the information

R

RED - Static variable in class RobotColor
 
removeKeyMonitor() - Method in class SGui
Removes all KeyMonitors
removeLast() - Method in class MoveTracker
Removes the last move from the moveTracker Vector and returns it.
removeLevel(int) - Method in class CustomLevelOrder
This function allows the user to remove custom level(s) from level list.
removeMove() - Method in class Robot
Removes a move from the moveTracker Vector.
removeRobot(int) - Method in class Map
Removes the Robot with a robotNumber equal to the passed robotNum from the robot list.
requestChangeLevel(String, int) - Method in class Game
Allows the user to agree or disagree to a change level request.
requestRestart(int) - Method in class Game
Allows the user to agree or disagree to a restart level request.
reset() - Method in class Time
The total time is reset to 0.
resetCratesIncinerated() - Method in class Robot
Sets the number of crates that the robot has incinerated.
resetMoveTracker() - Method in class Robot
Resets the moveTracker to an empty value.
resetPushes() - Method in class Robot
Sets the number of moves that the robot has taken.
resetStatDisplay() - Method in class SGui
Resets the stat display.
restartLevel() - Method in class Map
Current level is reset.
restartMap() - Method in class Game
Sends restartMap message to the Map class
Precondition: None.
resumeGame() - Method in class SGui
Enable the UI buttons disabled after a pause game.
RIGHT - Static variable in class Direction
 
Robot - class Robot.
The robot class represents an individual robot that is active on a level at any given time.
ROBOT - Static variable in class Square
 
Robot(String, int) - Constructor for class Robot
Creates a new Robot object of the given color at the given position and sets all other variables to their initial conditions.
RobotColor - class RobotColor.
The RobotColor class extends the Enumerate class and represents the four colors a Robot can be.
RobotColor(String) - Constructor for class RobotColor
Constructor - calls the constructor of the Enumerate class that RobotColor inherits.
robots - Variable in class Map
The robots is a Vector of up to 4 robots to represent each of the players in multiplayer mode.
run() - Method in class Client
Connects to and receives input from a server.
run() - Method in class Server
Initializes Server and waits for connections.
run() - Method in class ServerThread
Initializes ServerThread, receives input from clients and closes the connection when finished.

S

saveExt - Static variable in class Constants
the String file name extension for save game files
saveGame(int, String) - Method in class Game
This function allows the user to save his progress in the game
Precondition:User is engaged in a game
Postcondition:The game is saved
saveLevel(String) - Method in class LevelEditorUI
Saves the level that is currently being written.
savePath - Static variable in class Constants
The directory path to where the saved games are stored.
sendChangeLevelAccept(boolean, String) - Method in class Client
Creates a restartMap command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
sendChangeLevelRequest(String) - Method in class Client
Creates a restart request command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
sendChangeLevelRequest(String, int) - Method in class Server
Creates a restart request command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
sendChat - Variable in class SGui
 
sendChat(String, String) - Method in class Client
Creates a chat command String for the robot passed and sends the command to to the server.
sendChat(String, String) - Method in class Server
Creates a chat command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
sendCommand(String) - Method in class ServerThread
Sends the command parameter to the client.
sendDisconnect(int) - Method in class Server
Creates a disconnect command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
sendMap(String) - Method in class Server
Sends the current Map to all clients.
sendMove(int, Direction) - Method in class Client
Creates a move command String for the robot passed and sends the command to the server.
sendMove(int, Direction) - Method in class Server
Creates a move command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
sendRestartAccept(boolean) - Method in class Client
Creates a restartMap command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
sendRestartMap() - Method in class Server
Creates a restartMap command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
sendRestartRequest() - Method in class Client
Creates a restart request command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
sendRestartRequest(int) - Method in class Server
Creates a restart request command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
sendToAll(String) - Method in class Server
Sends a command String to all connected clients.
sendUndo(int) - Method in class Client
Creates an undo command String for the robot passed and sends the command to to the server.
sendUndo(int) - Method in class Server
Creates an undo command String for the robot passed and calls the sendToAll() method to send the command to all connected clients.
Server - class Server.
The Server class is a communications interface for an individual user who wants to host a multiplayer game of Sokoban.
Server(Game, int) - Constructor for class Server
Server constructor
ServerThread - class ServerThread.
The ServerThread class is a communications interface between the server and the client.
ServerThread(Game, Socket, int) - Constructor for class ServerThread
ServerThread constructor
setChangeLevelFlag(boolean) - Method in class Robot
Sets the changeLevel flag for the robot.
setCol(int) - Method in class Robot
Sets the current column location of the robot.
setColor(RobotColor) - Method in class Robot
Sets the current color of the robot.
setColor(RobotColor) - Method in class RobotColor
Sets the current color to the parameter passed
setCrateMoved(boolean) - Method in class Move
Sets whether or not a crate was moved in the move.
setCurrentLevel(String) - Method in class CustomLevelOrder
sets the currentLevel to the index of the passed String
setDebugMode(boolean) - Method in class Game
Sets whether the getTime() method reports time as always 1 or if it returns the correct value.
setDescription(String) - Method in class ExampleFileFilter
Sets the human readable description of this filter.
setDirection(Direction) - Method in class Move
Sets the direction that the robot moved.
setExtensionListInDescription(boolean) - Method in class ExampleFileFilter
Determines whether the extension list (.jpg, .gif, etc) should show up in the human readable description.
setIncinerated(boolean) - Method in class Move
Sets whether or not a crate was incinerated on a move.
setIP(String) - Method in class Client
Sets the ip address to connect to.
setLevelFinishedDisplay(int) - Method in class SGui
Displays the level finished screen giving the user's game statistics
setLevelName(String) - Method in class Level
Sets the level name to the parameter passed.
setLevelName(String) - Method in class SGui
Changes the level name displayed to the user.
setMapObserver(Observer) - Method in class Game
Adds an observer to the current map
setMapVisible() - Method in class SGui
Change the game display to show the map.
setMaxCon(int) - Method in class Server
Sets the maximum number of connections allowed.
setName(String) - Method in class HighScore
Sets the user's name to the passed value
setNextColor() - Method in class Robot
Returns the next color in the color order: blue, red, green and yellow.
setOwner(Game) - Method in class Client
Sets the owner attribute.
setOwner(Game) - Method in class MapRenderer
Set the link back to the Game class so that the maprenderer can get the map to know what to update.
setPauseDisplay() - Method in class SGui
Change the game display to show the pause screen and the map.
setPort(int) - Method in class Client
Sets the port to connect to.
setPort(int) - Method in class Server
Sets the port to listen on.
setRestartFlag(boolean) - Method in class Robot
Sets the restart flag for the robot.
setRobotMoved(boolean) - Method in class Move
Sets whether or not a robot was moved in the move.
setRow(int) - Method in class Robot
Sets the current row location of the robot.
setScore(int) - Method in class HighScore
Sets the user's score to the passed value
setTime(int) - Method in class Time
The total time is set to the time value passed.
setTimer(int) - Method in class Map
Sets the timer to the value passed.
setUserName(String) - Method in class Game
Sets the current userName to the passed name
setUserName(String) - Method in class Robot
Sets the user name of the robot.
setValueAt(Square, int, int) - Method in class Level
Changes the properties of the input square to whatever object is being assigned to it.
SGui - class SGui.
The SGui class is the Graphical User Interface for the Sokoban program
SGui(boolean) - Constructor for class SGui
Constructor - initializes the window and displays the start screen
showChangeLevelRequestDialog(String, String) - Method in class MultiplayerDialog
Shows a confirmation dialog box asking if the user wishes to change the current level.
showGoToDialog() - Method in class SGui
Show the go to level dialog box.
showHelpDialog(String) - Method in class SGui
Show a dialog box displaying the instructions text file.
showHostDialog() - Method in class MultiplayerDialog
 
showJoinDialog() - Method in class MultiplayerDialog
 
showLoadGameDialog() - Method in class FileDialog
Displays the load game dialog to the user.
showRestartRequestDialog(String) - Method in class MultiplayerDialog
Shows a confirmation dialog box asking if the user wishes to restart the current level.
showSaveGameDialog() - Method in class FileDialog
Displays the save game dialog to the user.
showStep() - Method in class Tutorial
Calls the instantReplay() method and then saves the board to the tempLevel file.
showWaitingDialog(boolean) - Method in class MultiplayerDialog
Displays the waiting for game to start dialog window.
Sokoban - class Sokoban.
The Sokoban class is the entry point for the Sokoban game.
Sokoban() - Constructor for class Sokoban
 
Sound - class Sound.
 
Sound() - Constructor for class Sound
 
Square - class Square.
The Square class extends the Enumerate class and represents the different types of squares located on a map.
Square(String) - Constructor for class Square
Constructor - calls the constructor of the Enumerate class that Square inherits.
start() - Method in class Time
Starts the timer so that the actionPerformed method will be called once every second.
startClient(String, int, MultiplayerDialog) - Method in class Game
Initilizes the client to connect to the server.
startGame - Variable in class MultiplayerDialog
Allows the user to start the game.
startGame(boolean) - Method in class SGui
Initializes the topPanel to begin displaying the map.
startHost - Variable in class MultiplayerDialog
JDialog starts waiting for connections when clicked.
STARTING_POSITION - Static variable in class Square
 
startJoin - Variable in class MultiplayerDialog
JDailog attempts to connect to server specified in connectData when clicked.
startMap(String) - Method in class Game
This function initializes the map, adds the robot(s) to the map and then loads the level to be played.
startServer(int, MultiplayerDialog) - Method in class Game
Tells the Server to begin listening for connections.
startTimer() - Method in class Game
Sends startTimer message to the Map class
Precondition: The game is not multiplayer
Postcondition: The timer is started.
startTimer() - Method in class Map
Starts the timer.
stop() - Method in class Time
Stops the timer from firing ActionEvents.
stopListening() - Method in class Server
Stops the Server from listening for connections.
stopMultiplayer() - Method in class Game
Disconnects the client and sends the disconnect message if this game is a client or disconnects all clients connected to the server if this game is a server.
stopServer() - Method in class Server
Stops the server and sends a disconnect message to each client.

T

Time - class Time.
The Time class is the total time spent solving a map.
Time() - Constructor for class Time
Constructor - initializes the timer
toArray() - Method in class HighScoresList
Returns the High Scores List as an array of HighScores.
toStringArray() - Method in class Map
Returns a 2-dimensional array containing the values representing the current map.
Tutorial - class Tutorial.
The Tutorial is an illustration of how Sokoban is to be played.
Tutorial(Game) - Constructor for class Tutorial
Initializes the tutorial and loads the first step.
tutPath - Static variable in class Constants
The directory path to where the tutorial files are stored.

U

undoMove(int) - Method in class Game
Sends undoMove message to the Map class.
undoMove(int) - Method in class Map
Updates the board to reflect the state before the robot's last move.
UP - Static variable in class Direction
 
update(Observable, Object) - Method in class MapRenderer
Paints the 9 squares surrounding the point passed to the method as the arg parameter.
updateDisplay() - Method in class Game
Informs the GUI to update the window
preconditons: none.
updateStats() - Method in class SGui
Updates the stat display.
updateUserList(Robot[]) - Method in class MultiplayerDialog
Updates the userListDisplay with the current robots' user names.
userListDisplay - Variable in class MultiplayerDialog
The JList that contains the list of users.
userName - Variable in class MultiplayerDialog
The text field input box for the user's name.

V

viewHighScores() - Method in class SGui
Displays the High Scores window

W

WALL - Static variable in class Square
 
wasIncinerated() - Method in class Move
Returns whether or not the crate was incinerated.

Y

YELLOW - Static variable in class RobotColor
 

A B C D E F G H I J K L M N O P R S T U V W Y