<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<!-- Generated by javadoc (build 1.6.0-rc) on Sat Jan 24 19:46:57 CET 2009 -->
SokobanTest
<
META NAME="date" CONTENT="2009-01-24">
<
LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<
SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SokobanTest";
}
}
<
BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<
A NAME="navbar_top"><!-- --><
/A>
<
A HREF="#skip-navbar_top" title="Skip navigation links"><
/A>
<
TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<
TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<
A NAME="navbar_top_firstrow"><!-- --><
/A>
<
TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<
TR ALIGN="center" VALIGN="top">
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../overview-summary.html"><
FONT CLASS="NavBarFont1"><
B>Overview<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-summary.html"><
FONT CLASS="NavBarFont1"><
B>Package<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <
FONT CLASS="NavBarFont1Rev"><
B>Class<
/B><
/FONT> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-tree.html"><
FONT CLASS="NavBarFont1"><
B>Tree<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../deprecated-list.html"><
FONT CLASS="NavBarFont1"><
B>Deprecated<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../index-all.html"><
FONT CLASS="NavBarFont1"><
B>Index<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../help-doc.html"><
FONT CLASS="NavBarFont1"><
B>Help<
/B><
/FONT><
/A> <
/TD>
<
TD ALIGN="right" VALIGN="top" ROWSPAN=3><
EM>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
PREV CLASS
<
A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html" title="class in gdi.ws0809.test"><
B>NEXT CLASS<
/B><
/A><
/FONT><
/TD>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../../index.html?gdi/ws0809/test/SokobanTest.html" target="_top"><
B>FRAMES<
/B><
/A>
<
A HREF="SokobanTest.html" target="_top"><
B>NO FRAMES<
/B><
/A>
<
SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
<
A HREF="../../../allclasses-noframe.html"><
B>All Classes<
/B><
/A>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <
A HREF="#method_summary">METHOD<
/A><
/FONT><
/TD>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <
A HREF="#method_detail">METHOD<
/A><
/FONT><
/TD>
<
A NAME="skip-navbar_top"><
/A>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
Interface SokobanTest<
/H2>
<
DT><
B>All Known Implementing Classes:<
/B> <
DD><
A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html" title="class in gdi.ws0809.test">SokobanTestAdapter<
/A><
/DD>
<
DT><
PRE>public interface <
B>SokobanTest<
/B><
/DL>
All public unit tests access your implementation using methods of this interface exclusively.
You have to provide an implementation of SokobanTestAdapter to map the methods of this interface
to you implementation.
<
DD>daniel, Steven Arzt<
/DD>
<!-- ========== METHOD SUMMARY =========== -->
<
A NAME="method_summary"><!-- --><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<
TH ALIGN="left" COLSPAN="2"><
FONT SIZE="+2">
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#canMoveCrate(int, int, char)">canMoveCrate<
/A><
/B>
(int i,
int j,
Checks whether the crate at position
(x, y
) can be moved in direction c<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#clearHighscoreList()">clearHighscoreList<
/A><
/B>
()<
/CODE>
Clears the highscore list.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#createHighscoreEntry(java.lang.String, int, int, int)">createHighscoreEntry<
/A><
/B>
(java.
lang.String playername,
int i,
int j,
Creates a new entry in the highscore list if the given data describes a
new highscore entry.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#currentLevelToString()">currentLevelToString<
/A><
/B>
()<
/CODE>
Returns the String representation of the <
i>current<
/i> level.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#getBestPlayerName()">getBestPlayerName<
/A><
/B>
()<
/CODE>
Gets the name of the best player (the one with with the least moves)
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#getCrateCount()">getCrateCount<
/A><
/B>
()<
/CODE>
Gets the total number of crates in the current levels<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#getGoalCount()">getGoalCount<
/A><
/B>
()<
/CODE>
Gets the total number of goals in the current levels<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#getHighscoreCount()">getHighscoreCount<
/A><
/B>
()<
/CODE>
Gets the count of entries in the highscore list<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#getLevelHeight()">getLevelHeight<
/A><
/B>
()<
/CODE>
Gets the current level's height</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getLevelWidth()">getLevelWidth</A></B>()</CODE>
<BR>
Gets the current level's width<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#getStepsInCurrentLevel()">getStepsInCurrentLevel<
/A><
/B>
()<
/CODE>
Return the steps performed in the <
i>current<
/i> level, since
the last restart of the level.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#getWallCount()">getWallCount<
/A><
/B>
()<
/CODE>
Gets the total number of walls in the current levels<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#getWorkerPositionX()">getWorkerPositionX<
/A><
/B>
()<
/CODE>
Gets the Y coordinate of the worker's current position</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getWorkerPositionY()">getWorkerPositionY</A></B>()</CODE>
<BR>
Gets the X coordinate of the worker's current position<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#isCrateAt(int, int)">isCrateAt<
/A><
/B>
(int i,
Gets whether there is a crate at the position identified by the specified
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#isDeadlock()">isDeadlock<
/A><
/B>
()<
/CODE>
Returns whether the current level is in a deadlock position.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#isGoalAt(int, int)">isGoalAt<
/A><
/B>
(int i,
Gets whether there is a goal at the position identified by the specified
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#isSolved()">isSolved<
/A><
/B>
()<
/CODE>
Returns whether the <
i>current<
/i> level is solved.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#isWallAt(int, int)">isWallAt<
/A><
/B>
(int i,
Gets whether there is a wall at the position identified by the specified
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#loadGame(java.io.File)">loadGame<
/A><
/B>
(java.io.File f
)<
/CODE>
Save the current game state to the File.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#loadLevel(java.io.File)">loadLevel<
/A><
/B>
(java.io.File lvl
)<
/CODE>
Load a level and parse it into the internal representation.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#moveWorker(char)">moveWorker<
/A><
/B>
(char direction
)<
/CODE>
Move the worker according to the
rules.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#moveWorkerSequence(java.lang.String)">moveWorkerSequence<
/A><
/B>
(java.
lang.String Sequence
)<
/CODE>
Moves the worker with the steps specified in the move sequence string
which needs to be in the RLUD format.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#redoLastUndoneMove()">redoLastUndoneMove<
/A><
/B>
()<
/CODE>
Redo the last undone move.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#saveGame(java.io.File)">saveGame<
/A><
/B>
(java.io.File f
)<
/CODE>
Save the current game state to the File.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#setLevelDir(java.io.File)">setLevelDir<
/A><
/B>
(java.io.File levelDir
)<
/CODE>
Load a set of levels from a directory.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#setPlayerName(java.lang.String)">setPlayerName<
/A><
/B>
(java.
lang.String
name)<
/CODE>
Set the player
name used
for highscores.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#startNextLevel()">startNextLevel<
/A><
/B>
()<
/CODE>
The next level in a set of levels loaded with loadLevelDir
becomes the <
i>current<
/i> level.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#undoLastMove()">undoLastMove<
/A><
/B>
()<
/CODE>
Undo the last move.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../../gdi/ws0809/test/SokobanTest.html#writeHighScoreFile()">writeHighScoreFile<
/A><
/B>
()<
/CODE>
Tells the Sokoban implementation to write the current
highscores to disk, as detailed in the documentation.<
/TD>
<!-- ============ METHOD DETAIL ========== -->
<
A NAME="method_detail"><!-- --><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<
TH ALIGN="left" COLSPAN="1"><
FONT SIZE="+2">
<
A NAME="loadLevel(java.io.File)"><!-- --><
/A><
H3>
void <
B>loadLevel<
/B>
(java.io.File lvl
)
throws java.
lang.Exception<
/PRE>
<
DD>Load a level and parse it into the internal representation.
The loaded level is now the and should
e.g. be shown in the GUI.
<
DT><
B>Parameters:<
/B><
DD><
CODE>lvl<
/CODE> - The file from which to load the level
<
DD><
CODE>java.
lang.Exception<
/CODE> - in case the level is not syntactically correct<
/DL>
<
A NAME="currentLevelToString()"><!-- --><
/A><
H3>
currentLevelToString<
/H3>
java.
lang.String <
B>currentLevelToString<
/B>
()<
/PRE>
<
DD>Returns the String representation of the <
i>current<
/i> level.
<
DT><
B>Returns:<
/B><
DD>the String representation<
/DL>
<
A NAME="isSolved()"><!-- --><
/A><
H3>
boolean <
B>isSolved<
/B>
()<
/PRE>
<
DD>Returns whether the <
i>current<
/i> level is solved.
<
DT><
B>Returns:<
/B><
DD>True if the current level has been solved, otherwise false<
/DL>
<
A NAME="getLevelWidth()"><!-- --><
/A><
H3>
int <
B>getLevelWidth<
/B>
()<
/PRE>
<
DD>Gets the current level
's width
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The width of the current level</DL>
</DD>
</DL>
<HR>
<A NAME="getLevelHeight()"><!-- --></A><H3>
getLevelHeight</H3>
<PRE>
int <B>getLevelHeight</B>()</PRE>
<DL>
<DD>Gets the current level's height
<
DT><
B>Returns:<
/B><
DD>The
height of the current level<
/DL>
<
A NAME="getWallCount()"><!-- --><
/A><
H3>
int <
B>getWallCount<
/B>
()<
/PRE>
<
DD>Gets the total number of walls in the current levels
<
DT><
B>Returns:<
/B><
DD>The number of walls in the current level<
/DL>
<
A NAME="getCrateCount()"><!-- --><
/A><
H3>
int <
B>getCrateCount<
/B>
()<
/PRE>
<
DD>Gets the total number of crates in the current levels
<
DT><
B>Returns:<
/B><
DD>The number of crates in the current level<
/DL>
<
A NAME="getGoalCount()"><!-- --><
/A><
H3>
int <
B>getGoalCount<
/B>
()<
/PRE>
<
DD>Gets the total number of goals in the current levels
<
DT><
B>Returns:<
/B><
DD>The number of goals in the current level<
/DL>
<
A NAME="moveWorker(char)"><!-- --><
/A><
H3>
void <
B>moveWorker<
/B>
(char direction
)<
/PRE>
<
DD>Move the worker according to the
rules. The direction to move is either
right, left, up or down, encoded as 'R','L','U' or 'D'.
<
DT><
B>Parameters:<
/B><
DD><
CODE>direction<
/CODE> - The encoded direction to move the worker<
/DL>
<
A NAME="setLevelDir(java.io.File)"><!-- --><
/A><
H3>
void <
B>setLevelDir<
/B>
(java.io.File levelDir
)<
/PRE>
<
DD>Load a set of levels from a directory. The levels should be
sorted alphabetically. It should not load the first level yet.
Loading the first level should only happen after a call to
startNextLevel().
<
DT><
B>Parameters:<
/B><
DD><
CODE>levelDir<
/CODE> - the directory from which to load the levels<
/DL>
<
A NAME="startNextLevel()"><!-- --><
/A><
H3>
void <
B>startNextLevel<
/B>
()
throws java.
lang.Exception<
/PRE>
<
DD>The next level in a set of levels loaded with loadLevelDir
becomes the <
i>current<
/i> level. If there is no more level
left, an exception may be thrown.
<
A NAME="getStepsInCurrentLevel()"><!-- --><
/A><
H3>
getStepsInCurrentLevel<
/H3>
int <
B>getStepsInCurrentLevel<
/B>
()<
/PRE>
<
DD>Return the steps performed in the <
i>current<
/i> level, since
the last restart of the level. Remember that only the legal moves
count.
<
DT><
B>Returns:<
/B><
DD>performed steps.<
/DL>
<
A NAME="writeHighScoreFile()"><!-- --><
/A><
H3>
void <
B>writeHighScoreFile<
/B>
()<
/PRE>
<
DD>Tells the Sokoban implementation to write the current
highscores to disk, as detailed in the documentation.
<
A NAME="setPlayerName(java.lang.String)"><!-- --><
/A><
H3>
void <
B>setPlayerName<
/B>
(java.
lang.String
name)<
/PRE>
<
DD>Set the player
name used
for highscores.
<
A NAME="getWorkerPositionY()"><!-- --><
/A><
H3>
int <
B>getWorkerPositionY<
/B>
()<
/PRE>
<
DD>Gets the X coordinate of the worker
's current position
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The worker's position's current X coordinate</DL>
</DD>
</DL>
<HR>
<A NAME="getWorkerPositionX()"><!-- --></A><H3>
getWorkerPositionX</H3>
<PRE>
int <B>getWorkerPositionX</B>()</PRE>
<DL>
<DD>Gets the Y coordinate of the worker's current position
<
DT><
B>Returns:<
/B><
DD>The worker
's position's current Y coordinate<
/DL>
<
A NAME="isCrateAt(int, int)"><!-- --><
/A><
H3>
boolean <
B>isCrateAt<
/B>
(int i,
<
DD>Gets whether there is a crate at the position identified by the specified
X and Y coordinate
<
DT><
B>Parameters:<
/B><
DD><
CODE>i<
/CODE> - The X coordinate of the grid position to check<
DD><
CODE>j<
/CODE> - The Y coordinate of the grid position to check
<
DT><
B>Returns:<
/B><
DD>True if there is a crate at the specified position, otherwise
<
A NAME="isWallAt(int, int)"><!-- --><
/A><
H3>
boolean <
B>isWallAt<
/B>
(int i,
<
DD>Gets whether there is a wall at the position identified by the specified
X and Y coordinate
<
DT><
B>Parameters:<
/B><
DD><
CODE>i<
/CODE> - The X coordinate of the grid position to check<
DD><
CODE>j<
/CODE> - The Y coordinate of the grid position to check
<
DT><
B>Returns:<
/B><
DD>True if there is a wall at the specified position, otherwise
<
A NAME="isGoalAt(int, int)"><!-- --><
/A><
H3>
boolean <
B>isGoalAt<
/B>
(int i,
<
DD>Gets whether there is a goal at the position identified by the specified
X and Y coordinate
<
DT><
B>Parameters:<
/B><
DD><
CODE>i<
/CODE> - The X coordinate of the grid position to check<
DD><
CODE>j<
/CODE> - The Y coordinate of the grid position to check
<
DT><
B>Returns:<
/B><
DD>True if there is a goal at the specified position, otherwise
<
A NAME="canMoveCrate(int, int, char)"><!-- --><
/A><
H3>
boolean <
B>canMoveCrate<
/B>
(int i,
int j,
<
DD>Checks whether the crate at position
(x, y
) can be moved in direction c
<
DT><
B>Parameters:<
/B><
DD><
CODE>i<
/CODE> - The x coordinate of the crate to check<
DD><
CODE>j<
/CODE> - The y coordinate of the crate to check<
DD><
CODE>c<
/CODE> - The direction in which the crate move shall be tested
<
DT><
B>Returns:<
/B><
DD>True if the crate at the specified position can be moved in the
given direction, otherwise false<
/DL>
<
A NAME="getBestPlayerName()"><!-- --><
/A><
H3>
java.
lang.String <
B>getBestPlayerName<
/B>
()<
/PRE>
<
DD>Gets the
name of the best player
(the one with with the least moves
)
over all levels. If Player A has completed level L1 with 10 moves and
level L2 with 15 moves and player B has completed level L2 with 11 moves,
the correct return value would be "A" as he has achieved to complete a
level with only 10 moves.
If the highscore list is empty, an empty string shall be returned.
<
DT><
B>Returns:<
/B><
DD>The
name of the player with the least moves<
/DL>
<
A NAME="clearHighscoreList()"><!-- --><
/A><
H3>
void <
B>clearHighscoreList<
/B>
()<
/PRE>
<
DD>Clears the highscore list. You can either remove all entries from the
"highscore.txt" file or remove the whole file. If there is no highscore
file at the moment, nothing should happen.
<
A NAME="createHighscoreEntry(java.lang.String, int, int, int)"><!-- --><
/A><
H3>
createHighscoreEntry<
/H3>
boolean <
B>createHighscoreEntry<
/B>
(java.
lang.String playername,
int i,
int j,
<
DD>Creates a new entry in the highscore list if the given
data describes a
new highscore entry. If the specified entry already exists or has too
many steps to be a highscore, nothing happens and false is returned.
<
DT><
B>Parameters:<
/B><
DD><
CODE>playername<
/CODE> - The
name of the player that has achieved the score<
DD><
CODE>i<
/CODE> - A unique number identifying the level in which the score has
been reached<
DD><
CODE>j<
/CODE> - The count of moves the player has needed to complete the
specified level<
DD><
CODE>k<
/CODE> - The time the player has needed to solve the level in seconds
<
DT><
B>Returns:<
/B><
DD>True if a new entry in the highscore list has been created,
<
A NAME="getHighscoreCount()"><!-- --><
/A><
H3>
int <
B>getHighscoreCount<
/B>
()<
/PRE>
<
DD>Gets the count of entries in the highscore list
<
DT><
B>Returns:<
/B><
DD>The count of entries in the highscore list<
/DL>
<
A NAME="undoLastMove()"><!-- --><
/A><
H3>
void <
B>undoLastMove<
/B>
()
throws java.
lang.Exception<
/PRE>
<
DD>Undo the last move. If no move can be undone
(e.g. no move has been performed
) an Exception is thrown.
<
DD><
CODE>java.
lang.Exception<
/CODE> - notifying the client that no move could be undone<
/DL>
<
A NAME="redoLastUndoneMove()"><!-- --><
/A><
H3>
void <
B>redoLastUndoneMove<
/B>
()
throws java.
lang.Exception<
/PRE>
<
DD>Redo the last undone move. If no move can be redone
(e.g. no move has been undone
) an Exception is thrown.
<
DD><
CODE>java.
lang.Exception<
/CODE> - notifying the client that no move could be redone<
/DL>
<
A NAME="saveGame(java.io.File)"><!-- --><
/A><
H3>
void <
B>saveGame<
/B>
(java.io.File f
)<
/PRE>
<
DD>Save the current game state to the File.
<
DT><
B>Parameters:<
/B><
DD><
CODE>f<
/CODE> - the file to save the game state in.<
/DL>
<
A NAME="loadGame(java.io.File)"><!-- --><
/A><
H3>
void <
B>loadGame<
/B>
(java.io.File f
)<
/PRE>
<
DD>Save the current game state to the File.
<
DT><
B>Parameters:<
/B><
DD><
CODE>f<
/CODE> - the file to save the game state in.<
/DL>
<
A NAME="isDeadlock()"><!-- --><
/A><
H3>
boolean <
B>isDeadlock<
/B>
()<
/PRE>
<
DD>Returns whether the current level is in a deadlock position.
<
DT><
B>Returns:<
/B><
DD>returns whether the current level is in a deadlock position.<
/DL>
<
A NAME="moveWorkerSequence(java.lang.String)"><!-- --><
/A><
H3>
void <
B>moveWorkerSequence<
/B>
(java.
lang.String Sequence
)<
/PRE>
<
DD>Moves the worker with the steps specified in the move sequence string
which needs to be in the RLUD format.
<
DT><
B>Parameters:<
/B><
DD><
CODE>Sequence<
/CODE> - The move sequence in the RLUD format<
/DL>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<
A NAME="navbar_bottom"><!-- --><
/A>
<
A HREF="#skip-navbar_bottom" title="Skip navigation links"><
/A>
<
TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<
TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<
A NAME="navbar_bottom_firstrow"><!-- --><
/A>
<
TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<
TR ALIGN="center" VALIGN="top">
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../overview-summary.html"><
FONT CLASS="NavBarFont1"><
B>Overview<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-summary.html"><
FONT CLASS="NavBarFont1"><
B>Package<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <
FONT CLASS="NavBarFont1Rev"><
B>Class<
/B><
/FONT> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-tree.html"><
FONT CLASS="NavBarFont1"><
B>Tree<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../deprecated-list.html"><
FONT CLASS="NavBarFont1"><
B>Deprecated<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../index-all.html"><
FONT CLASS="NavBarFont1"><
B>Index<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../../help-doc.html"><
FONT CLASS="NavBarFont1"><
B>Help<
/B><
/FONT><
/A> <
/TD>
<
TD ALIGN="right" VALIGN="top" ROWSPAN=3><
EM>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
PREV CLASS
<
A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html" title="class in gdi.ws0809.test"><
B>NEXT CLASS<
/B><
/A><
/FONT><
/TD>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../../index.html?gdi/ws0809/test/SokobanTest.html" target="_top"><
B>FRAMES<
/B><
/A>
<
A HREF="SokobanTest.html" target="_top"><
B>NO FRAMES<
/B><
/A>
<
SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
<
A HREF="../../../allclasses-noframe.html"><
B>All Classes<
/B><
/A>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <
A HREF="#method_summary">METHOD<
/A><
/FONT><
/TD>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <
A HREF="#method_detail">METHOD<
/A><
/FONT><
/TD>
<
A NAME="skip-navbar_bottom"><
/A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->