Subversion Repositories sokoban

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 daniel-mar 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!--NewPage-->
3
<HTML>
4
<HEAD>
5
<!-- Generated by javadoc (build 1.6.0-rc) on Sat Jan 24 19:46:57 CET 2009 -->
6
<TITLE>
7
SokobanTestAdapter
8
</TITLE>
9
 
10
<META NAME="date" CONTENT="2009-01-24">
11
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
 
14
<SCRIPT type="text/javascript">
15
function windowTitle()
16
{
17
    if (location.href.indexOf('is-external=true') == -1) {
18
        parent.document.title="SokobanTestAdapter";
19
    }
20
}
21
</SCRIPT>
22
<NOSCRIPT>
23
</NOSCRIPT>
24
 
25
</HEAD>
26
 
27
<BODY BGCOLOR="white" onload="windowTitle();">
28
<HR>
29
 
30
 
31
<!-- ========= START OF TOP NAVBAR ======= -->
32
<A NAME="navbar_top"><!-- --></A>
33
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35
<TR>
36
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37
<A NAME="navbar_top_firstrow"><!-- --></A>
38
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39
  <TR ALIGN="center" VALIGN="top">
40
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
46
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
47
  </TR>
48
</TABLE>
49
</TD>
50
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51
</EM>
52
</TD>
53
</TR>
54
 
55
<TR>
56
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57
&nbsp;<A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test"><B>PREV CLASS</B></A>&nbsp;
58
&nbsp;<A HREF="../../../gdi/ws0809/test/SokobanTestExtended1.html" title="class in gdi.ws0809.test"><B>NEXT CLASS</B></A></FONT></TD>
59
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60
  <A HREF="../../../index.html?gdi/ws0809/test/SokobanTestAdapter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61
&nbsp;<A HREF="SokobanTestAdapter.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
62
&nbsp;<SCRIPT type="text/javascript">
63
  <!--
64
  if(window==top) {
65
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
66
  }
67
  //-->
68
</SCRIPT>
69
<NOSCRIPT>
70
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
71
</NOSCRIPT>
72
 
73
 
74
</FONT></TD>
75
</TR>
76
<TR>
77
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
79
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
81
</TR>
82
</TABLE>
83
<A NAME="skip-navbar_top"></A>
84
<!-- ========= END OF TOP NAVBAR ========= -->
85
 
86
<HR>
87
<!-- ======== START OF CLASS DATA ======== -->
88
<H2>
89
<FONT SIZE="-1">
90
gdi.ws0809.test</FONT>
91
<BR>
92
Class SokobanTestAdapter</H2>
93
<PRE>
94
java.lang.Object
95
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>gdi.ws0809.test.SokobanTestAdapter</B>
96
</PRE>
97
<DL>
98
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></DD>
99
</DL>
100
<HR>
101
<DL>
102
<DT><PRE>public class <B>SokobanTestAdapter</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></DL>
103
</PRE>
104
 
105
<P>
106
Provide an implementation for SokobanTest in this class. Your game must
107
 compile and run without this class. This class is just meant to adapt the
108
 test cases to your implementation.
109
<P>
110
 
111
<P>
112
<DL>
113
<DT><B>Author:</B></DT>
114
  <DD>daniel</DD>
115
</DL>
116
<HR>
117
 
118
<P>
119
 
120
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
121
 
122
<A NAME="constructor_summary"><!-- --></A>
123
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
124
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
125
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
126
<B>Constructor Summary</B></FONT></TH>
127
</TR>
128
<TR BGCOLOR="white" CLASS="TableRowColor">
129
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#SokobanTestAdapter()">SokobanTestAdapter</A></B>()</CODE>
130
 
131
<BR>
132
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
133
</TR>
134
</TABLE>
135
&nbsp;
136
<!-- ========== METHOD SUMMARY =========== -->
137
 
138
<A NAME="method_summary"><!-- --></A>
139
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
142
<B>Method Summary</B></FONT></TH>
143
</TR>
144
<TR BGCOLOR="white" CLASS="TableRowColor">
145
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146
<CODE>&nbsp;boolean</CODE></FONT></TD>
147
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#canMoveCrate(int, int, char)">canMoveCrate</A></B>(int&nbsp;i,
148
             int&nbsp;j,
149
             char&nbsp;c)</CODE>
150
 
151
<BR>
152
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether the crate at position (x, y) can be moved in direction c</TD>
153
</TR>
154
<TR BGCOLOR="white" CLASS="TableRowColor">
155
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
156
<CODE>&nbsp;void</CODE></FONT></TD>
157
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#clearHighscoreList()">clearHighscoreList</A></B>()</CODE>
158
 
159
<BR>
160
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears the highscore list.</TD>
161
</TR>
162
<TR BGCOLOR="white" CLASS="TableRowColor">
163
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
164
<CODE>&nbsp;boolean</CODE></FONT></TD>
165
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#createHighscoreEntry(java.lang.String, int, int, int)">createHighscoreEntry</A></B>(java.lang.String&nbsp;playername,
166
                     int&nbsp;i,
167
                     int&nbsp;j,
168
                     int&nbsp;k)</CODE>
169
 
170
<BR>
171
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new entry in the highscore list if the given data describes a
172
 new highscore entry.</TD>
173
</TR>
174
<TR BGCOLOR="white" CLASS="TableRowColor">
175
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
177
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#currentLevelToString()">currentLevelToString</A></B>()</CODE>
178
 
179
<BR>
180
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the String representation of the <i>current</i> level.</TD>
181
</TR>
182
<TR BGCOLOR="white" CLASS="TableRowColor">
183
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
185
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#getBestPlayerName()">getBestPlayerName</A></B>()</CODE>
186
 
187
<BR>
188
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the name of the best player (the one with with the least moves)
189
 over all levels.</TD>
190
</TR>
191
<TR BGCOLOR="white" CLASS="TableRowColor">
192
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
193
<CODE>&nbsp;int</CODE></FONT></TD>
194
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#getCrateCount()">getCrateCount</A></B>()</CODE>
195
 
196
<BR>
197
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the total number of crates in the current levels</TD>
198
</TR>
199
<TR BGCOLOR="white" CLASS="TableRowColor">
200
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
201
<CODE>&nbsp;int</CODE></FONT></TD>
202
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#getGoalCount()">getGoalCount</A></B>()</CODE>
203
 
204
<BR>
205
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the total number of goals in the current levels</TD>
206
</TR>
207
<TR BGCOLOR="white" CLASS="TableRowColor">
208
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
209
<CODE>&nbsp;int</CODE></FONT></TD>
210
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#getHighscoreCount()">getHighscoreCount</A></B>()</CODE>
211
 
212
<BR>
213
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the count of entries in the highscore list</TD>
214
</TR>
215
<TR BGCOLOR="white" CLASS="TableRowColor">
216
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
217
<CODE>&nbsp;int</CODE></FONT></TD>
218
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#getLevelHeight()">getLevelHeight</A></B>()</CODE>
219
 
220
<BR>
221
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current level's height</TD>
222
</TR>
223
<TR BGCOLOR="white" CLASS="TableRowColor">
224
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
225
<CODE>&nbsp;int</CODE></FONT></TD>
226
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#getLevelWidth()">getLevelWidth</A></B>()</CODE>
227
 
228
<BR>
229
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current level's width</TD>
230
</TR>
231
<TR BGCOLOR="white" CLASS="TableRowColor">
232
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
233
<CODE>&nbsp;int</CODE></FONT></TD>
234
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#getStepsInCurrentLevel()">getStepsInCurrentLevel</A></B>()</CODE>
235
 
236
<BR>
237
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the steps performed in the <i>current</i> level, since
238
 the last restart of the level.</TD>
239
</TR>
240
<TR BGCOLOR="white" CLASS="TableRowColor">
241
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
242
<CODE>&nbsp;int</CODE></FONT></TD>
243
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#getWallCount()">getWallCount</A></B>()</CODE>
244
 
245
<BR>
246
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the total number of walls in the current levels</TD>
247
</TR>
248
<TR BGCOLOR="white" CLASS="TableRowColor">
249
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
250
<CODE>&nbsp;int</CODE></FONT></TD>
251
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#getWorkerPositionX()">getWorkerPositionX</A></B>()</CODE>
252
 
253
<BR>
254
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the Y coordinate of the worker's current position</TD>
255
</TR>
256
<TR BGCOLOR="white" CLASS="TableRowColor">
257
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
258
<CODE>&nbsp;int</CODE></FONT></TD>
259
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#getWorkerPositionY()">getWorkerPositionY</A></B>()</CODE>
260
 
261
<BR>
262
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the X coordinate of the worker's current position</TD>
263
</TR>
264
<TR BGCOLOR="white" CLASS="TableRowColor">
265
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
266
<CODE>static&nbsp;void</CODE></FONT></TD>
267
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#init()">init</A></B>()</CODE>
268
 
269
<BR>
270
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
271
</TR>
272
<TR BGCOLOR="white" CLASS="TableRowColor">
273
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
274
<CODE>&nbsp;boolean</CODE></FONT></TD>
275
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#isCrateAt(int, int)">isCrateAt</A></B>(int&nbsp;i,
276
          int&nbsp;j)</CODE>
277
 
278
<BR>
279
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets whether there is a crate at the position identified by the specified
280
 X and Y coordinate</TD>
281
</TR>
282
<TR BGCOLOR="white" CLASS="TableRowColor">
283
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
284
<CODE>&nbsp;boolean</CODE></FONT></TD>
285
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#isDeadlock()">isDeadlock</A></B>()</CODE>
286
 
287
<BR>
288
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the current level is in a deadlock position.</TD>
289
</TR>
290
<TR BGCOLOR="white" CLASS="TableRowColor">
291
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
292
<CODE>&nbsp;boolean</CODE></FONT></TD>
293
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#isGoalAt(int, int)">isGoalAt</A></B>(int&nbsp;i,
294
         int&nbsp;j)</CODE>
295
 
296
<BR>
297
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets whether there is a goal at the position identified by the specified
298
 X and Y coordinate</TD>
299
</TR>
300
<TR BGCOLOR="white" CLASS="TableRowColor">
301
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
302
<CODE>&nbsp;boolean</CODE></FONT></TD>
303
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#isSolved()">isSolved</A></B>()</CODE>
304
 
305
<BR>
306
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the <i>current</i> level is solved.</TD>
307
</TR>
308
<TR BGCOLOR="white" CLASS="TableRowColor">
309
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
310
<CODE>&nbsp;boolean</CODE></FONT></TD>
311
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#isWallAt(int, int)">isWallAt</A></B>(int&nbsp;i,
312
         int&nbsp;j)</CODE>
313
 
314
<BR>
315
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets whether there is a wall at the position identified by the specified
316
 X and Y coordinate</TD>
317
</TR>
318
<TR BGCOLOR="white" CLASS="TableRowColor">
319
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
320
<CODE>&nbsp;void</CODE></FONT></TD>
321
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#loadGame(java.io.File)">loadGame</A></B>(java.io.File&nbsp;saveFile)</CODE>
322
 
323
<BR>
324
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save the current game state to the File.</TD>
325
</TR>
326
<TR BGCOLOR="white" CLASS="TableRowColor">
327
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
328
<CODE>&nbsp;void</CODE></FONT></TD>
329
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#loadLevel(java.io.File)">loadLevel</A></B>(java.io.File&nbsp;lvl)</CODE>
330
 
331
<BR>
332
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Load a level and parse it into the internal representation.</TD>
333
</TR>
334
<TR BGCOLOR="white" CLASS="TableRowColor">
335
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
336
<CODE>&nbsp;void</CODE></FONT></TD>
337
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#moveWorker(char)">moveWorker</A></B>(char&nbsp;direction)</CODE>
338
 
339
<BR>
340
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Move the worker according to the rules.</TD>
341
</TR>
342
<TR BGCOLOR="white" CLASS="TableRowColor">
343
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
344
<CODE>&nbsp;void</CODE></FONT></TD>
345
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#moveWorkerSequence(java.lang.String)">moveWorkerSequence</A></B>(java.lang.String&nbsp;moves)</CODE>
346
 
347
<BR>
348
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the worker with the steps specified in the move sequence string
349
 which needs to be in the RLUD format.</TD>
350
</TR>
351
<TR BGCOLOR="white" CLASS="TableRowColor">
352
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
353
<CODE>&nbsp;void</CODE></FONT></TD>
354
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#redoLastUndoneMove()">redoLastUndoneMove</A></B>()</CODE>
355
 
356
<BR>
357
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Redo the last undone move.</TD>
358
</TR>
359
<TR BGCOLOR="white" CLASS="TableRowColor">
360
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
361
<CODE>&nbsp;void</CODE></FONT></TD>
362
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#saveGame(java.io.File)">saveGame</A></B>(java.io.File&nbsp;f)</CODE>
363
 
364
<BR>
365
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save the current game state to the File.</TD>
366
</TR>
367
<TR BGCOLOR="white" CLASS="TableRowColor">
368
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
369
<CODE>&nbsp;void</CODE></FONT></TD>
370
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#setLevelDir(java.io.File)">setLevelDir</A></B>(java.io.File&nbsp;levelDir)</CODE>
371
 
372
<BR>
373
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Load a set of levels from a directory.</TD>
374
</TR>
375
<TR BGCOLOR="white" CLASS="TableRowColor">
376
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
377
<CODE>&nbsp;void</CODE></FONT></TD>
378
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#setPlayerName(java.lang.String)">setPlayerName</A></B>(java.lang.String&nbsp;name)</CODE>
379
 
380
<BR>
381
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the player name used for highscores.</TD>
382
</TR>
383
<TR BGCOLOR="white" CLASS="TableRowColor">
384
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
385
<CODE>&nbsp;void</CODE></FONT></TD>
386
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#startNextLevel()">startNextLevel</A></B>()</CODE>
387
 
388
<BR>
389
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The next level in a set of levels loaded with loadLevelDir
390
 becomes the <i>current</i> level.</TD>
391
</TR>
392
<TR BGCOLOR="white" CLASS="TableRowColor">
393
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
394
<CODE>&nbsp;void</CODE></FONT></TD>
395
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#undoLastMove()">undoLastMove</A></B>()</CODE>
396
 
397
<BR>
398
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Undo the last move.</TD>
399
</TR>
400
<TR BGCOLOR="white" CLASS="TableRowColor">
401
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
402
<CODE>&nbsp;void</CODE></FONT></TD>
403
<TD><CODE><B><A HREF="../../../gdi/ws0809/test/SokobanTestAdapter.html#writeHighScoreFile()">writeHighScoreFile</A></B>()</CODE>
404
 
405
<BR>
406
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells the Sokoban implementation to write the current
407
 highscores to disk, as detailed in the documentation.</TD>
408
</TR>
409
</TABLE>
410
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
411
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
412
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
413
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
414
</TR>
415
<TR BGCOLOR="white" CLASS="TableRowColor">
416
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
417
</TR>
418
</TABLE>
419
&nbsp;
420
<P>
421
 
422
<!-- ========= CONSTRUCTOR DETAIL ======== -->
423
 
424
<A NAME="constructor_detail"><!-- --></A>
425
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
426
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
427
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
428
<B>Constructor Detail</B></FONT></TH>
429
</TR>
430
</TABLE>
431
 
432
<A NAME="SokobanTestAdapter()"><!-- --></A><H3>
433
SokobanTestAdapter</H3>
434
<PRE>
435
public <B>SokobanTestAdapter</B>()</PRE>
436
<DL>
437
</DL>
438
 
439
<!-- ============ METHOD DETAIL ========== -->
440
 
441
<A NAME="method_detail"><!-- --></A>
442
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
443
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
444
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
445
<B>Method Detail</B></FONT></TH>
446
</TR>
447
</TABLE>
448
 
449
<A NAME="init()"><!-- --></A><H3>
450
init</H3>
451
<PRE>
452
public static void <B>init</B>()</PRE>
453
<DL>
454
<DD><DL>
455
</DL>
456
</DD>
457
<DD><DL>
458
</DL>
459
</DD>
460
</DL>
461
<HR>
462
 
463
<A NAME="currentLevelToString()"><!-- --></A><H3>
464
currentLevelToString</H3>
465
<PRE>
466
public java.lang.String <B>currentLevelToString</B>()</PRE>
467
<DL>
468
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#currentLevelToString()">SokobanTest</A></CODE></B></DD>
469
<DD>Returns the String representation of the <i>current</i> level.
470
<P>
471
<DD><DL>
472
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#currentLevelToString()">currentLevelToString</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
473
</DD>
474
<DD><DL>
475
 
476
<DT><B>Returns:</B><DD>the String representation</DL>
477
</DD>
478
</DL>
479
<HR>
480
 
481
<A NAME="loadLevel(java.io.File)"><!-- --></A><H3>
482
loadLevel</H3>
483
<PRE>
484
public void <B>loadLevel</B>(java.io.File&nbsp;lvl)
485
               throws java.lang.Exception</PRE>
486
<DL>
487
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#loadLevel(java.io.File)">SokobanTest</A></CODE></B></DD>
488
<DD>Load a level and parse it into the internal representation.
489
 The loaded level is now the  and should
490
 e.g. be shown in the GUI.
491
<P>
492
<DD><DL>
493
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#loadLevel(java.io.File)">loadLevel</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
494
</DD>
495
<DD><DL>
496
<DT><B>Parameters:</B><DD><CODE>lvl</CODE> - The file from which to load the level
497
<DT><B>Throws:</B>
498
<DD><CODE>java.lang.Exception</CODE> - in case the level is not syntactically correct</DL>
499
</DD>
500
</DL>
501
<HR>
502
 
503
<A NAME="isSolved()"><!-- --></A><H3>
504
isSolved</H3>
505
<PRE>
506
public boolean <B>isSolved</B>()</PRE>
507
<DL>
508
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#isSolved()">SokobanTest</A></CODE></B></DD>
509
<DD>Returns whether the <i>current</i> level is solved.
510
<P>
511
<DD><DL>
512
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#isSolved()">isSolved</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
513
</DD>
514
<DD><DL>
515
 
516
<DT><B>Returns:</B><DD>True if the current level has been solved, otherwise false</DL>
517
</DD>
518
</DL>
519
<HR>
520
 
521
<A NAME="moveWorker(char)"><!-- --></A><H3>
522
moveWorker</H3>
523
<PRE>
524
public void <B>moveWorker</B>(char&nbsp;direction)</PRE>
525
<DL>
526
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#moveWorker(char)">SokobanTest</A></CODE></B></DD>
527
<DD>Move the worker according to the rules. The direction to move is either
528
 right, left, up or down, encoded as 'R','L','U' or 'D'.
529
<P>
530
<DD><DL>
531
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#moveWorker(char)">moveWorker</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
532
</DD>
533
<DD><DL>
534
<DT><B>Parameters:</B><DD><CODE>direction</CODE> - The encoded direction to move the worker</DL>
535
</DD>
536
</DL>
537
<HR>
538
 
539
<A NAME="setLevelDir(java.io.File)"><!-- --></A><H3>
540
setLevelDir</H3>
541
<PRE>
542
public void <B>setLevelDir</B>(java.io.File&nbsp;levelDir)</PRE>
543
<DL>
544
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#setLevelDir(java.io.File)">SokobanTest</A></CODE></B></DD>
545
<DD>Load a set of levels from a directory. The levels should be
546
 sorted alphabetically. It should not load the first level yet.
547
 Loading the first level should only happen after a call to
548
 startNextLevel().
549
<P>
550
<DD><DL>
551
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#setLevelDir(java.io.File)">setLevelDir</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
552
</DD>
553
<DD><DL>
554
<DT><B>Parameters:</B><DD><CODE>levelDir</CODE> - the directory from which to load the levels</DL>
555
</DD>
556
</DL>
557
<HR>
558
 
559
<A NAME="startNextLevel()"><!-- --></A><H3>
560
startNextLevel</H3>
561
<PRE>
562
public void <B>startNextLevel</B>()
563
                    throws java.lang.Exception</PRE>
564
<DL>
565
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#startNextLevel()">SokobanTest</A></CODE></B></DD>
566
<DD>The next level in a set of levels loaded with loadLevelDir
567
 becomes the <i>current</i> level. If there is no more level
568
 left, an exception may be thrown.
569
<P>
570
<DD><DL>
571
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#startNextLevel()">startNextLevel</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
572
</DD>
573
<DD><DL>
574
 
575
<DT><B>Throws:</B>
576
<DD><CODE>java.lang.Exception</CODE></DL>
577
</DD>
578
</DL>
579
<HR>
580
 
581
<A NAME="getStepsInCurrentLevel()"><!-- --></A><H3>
582
getStepsInCurrentLevel</H3>
583
<PRE>
584
public int <B>getStepsInCurrentLevel</B>()</PRE>
585
<DL>
586
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getStepsInCurrentLevel()">SokobanTest</A></CODE></B></DD>
587
<DD>Return the steps performed in the <i>current</i> level, since
588
 the last restart of the level. Remember that only the legal moves
589
 count.
590
<P>
591
<DD><DL>
592
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getStepsInCurrentLevel()">getStepsInCurrentLevel</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
593
</DD>
594
<DD><DL>
595
 
596
<DT><B>Returns:</B><DD>performed steps.</DL>
597
</DD>
598
</DL>
599
<HR>
600
 
601
<A NAME="writeHighScoreFile()"><!-- --></A><H3>
602
writeHighScoreFile</H3>
603
<PRE>
604
public void <B>writeHighScoreFile</B>()</PRE>
605
<DL>
606
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#writeHighScoreFile()">SokobanTest</A></CODE></B></DD>
607
<DD>Tells the Sokoban implementation to write the current
608
 highscores to disk, as detailed in the documentation.
609
<P>
610
<DD><DL>
611
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#writeHighScoreFile()">writeHighScoreFile</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
612
</DD>
613
<DD><DL>
614
</DL>
615
</DD>
616
</DL>
617
<HR>
618
 
619
<A NAME="setPlayerName(java.lang.String)"><!-- --></A><H3>
620
setPlayerName</H3>
621
<PRE>
622
public void <B>setPlayerName</B>(java.lang.String&nbsp;name)</PRE>
623
<DL>
624
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#setPlayerName(java.lang.String)">SokobanTest</A></CODE></B></DD>
625
<DD>Set the player name used for highscores.
626
<P>
627
<DD><DL>
628
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#setPlayerName(java.lang.String)">setPlayerName</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
629
</DD>
630
<DD><DL>
631
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The player name.</DL>
632
</DD>
633
</DL>
634
<HR>
635
 
636
<A NAME="redoLastUndoneMove()"><!-- --></A><H3>
637
redoLastUndoneMove</H3>
638
<PRE>
639
public void <B>redoLastUndoneMove</B>()
640
                        throws java.lang.Exception</PRE>
641
<DL>
642
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#redoLastUndoneMove()">SokobanTest</A></CODE></B></DD>
643
<DD>Redo the last undone move. If no move can be redone (e.g. no move has been undone) an Exception is thrown.
644
<P>
645
<DD><DL>
646
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#redoLastUndoneMove()">redoLastUndoneMove</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
647
</DD>
648
<DD><DL>
649
 
650
<DT><B>Throws:</B>
651
<DD><CODE>java.lang.Exception</CODE> - notifying the client that no move could be redone</DL>
652
</DD>
653
</DL>
654
<HR>
655
 
656
<A NAME="undoLastMove()"><!-- --></A><H3>
657
undoLastMove</H3>
658
<PRE>
659
public void <B>undoLastMove</B>()
660
                  throws java.lang.Exception</PRE>
661
<DL>
662
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#undoLastMove()">SokobanTest</A></CODE></B></DD>
663
<DD>Undo the last move. If no move can be undone (e.g. no move has been performed) an Exception is thrown.
664
<P>
665
<DD><DL>
666
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#undoLastMove()">undoLastMove</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
667
</DD>
668
<DD><DL>
669
 
670
<DT><B>Throws:</B>
671
<DD><CODE>java.lang.Exception</CODE> - notifying the client that no move could be undone</DL>
672
</DD>
673
</DL>
674
<HR>
675
 
676
<A NAME="loadGame(java.io.File)"><!-- --></A><H3>
677
loadGame</H3>
678
<PRE>
679
public void <B>loadGame</B>(java.io.File&nbsp;saveFile)</PRE>
680
<DL>
681
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#loadGame(java.io.File)">SokobanTest</A></CODE></B></DD>
682
<DD>Save the current game state to the File.
683
<P>
684
<DD><DL>
685
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#loadGame(java.io.File)">loadGame</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
686
</DD>
687
<DD><DL>
688
<DT><B>Parameters:</B><DD><CODE>saveFile</CODE> - the file to save the game state in.</DL>
689
</DD>
690
</DL>
691
<HR>
692
 
693
<A NAME="saveGame(java.io.File)"><!-- --></A><H3>
694
saveGame</H3>
695
<PRE>
696
public void <B>saveGame</B>(java.io.File&nbsp;f)</PRE>
697
<DL>
698
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#saveGame(java.io.File)">SokobanTest</A></CODE></B></DD>
699
<DD>Save the current game state to the File.
700
<P>
701
<DD><DL>
702
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#saveGame(java.io.File)">saveGame</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
703
</DD>
704
<DD><DL>
705
<DT><B>Parameters:</B><DD><CODE>f</CODE> - the file to save the game state in.</DL>
706
</DD>
707
</DL>
708
<HR>
709
 
710
<A NAME="isDeadlock()"><!-- --></A><H3>
711
isDeadlock</H3>
712
<PRE>
713
public boolean <B>isDeadlock</B>()</PRE>
714
<DL>
715
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#isDeadlock()">SokobanTest</A></CODE></B></DD>
716
<DD>Returns whether the current level is in a deadlock position.
717
<P>
718
<DD><DL>
719
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#isDeadlock()">isDeadlock</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
720
</DD>
721
<DD><DL>
722
 
723
<DT><B>Returns:</B><DD>returns whether the current level is in a deadlock position.</DL>
724
</DD>
725
</DL>
726
<HR>
727
 
728
<A NAME="canMoveCrate(int, int, char)"><!-- --></A><H3>
729
canMoveCrate</H3>
730
<PRE>
731
public boolean <B>canMoveCrate</B>(int&nbsp;i,
732
                            int&nbsp;j,
733
                            char&nbsp;c)</PRE>
734
<DL>
735
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#canMoveCrate(int, int, char)">SokobanTest</A></CODE></B></DD>
736
<DD>Checks whether the crate at position (x, y) can be moved in direction c
737
<P>
738
<DD><DL>
739
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#canMoveCrate(int, int, char)">canMoveCrate</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
740
</DD>
741
<DD><DL>
742
<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
743
<DT><B>Returns:</B><DD>True if the crate at the specified position can be moved in the
744
 given direction, otherwise false</DL>
745
</DD>
746
</DL>
747
<HR>
748
 
749
<A NAME="createHighscoreEntry(java.lang.String, int, int, int)"><!-- --></A><H3>
750
createHighscoreEntry</H3>
751
<PRE>
752
public boolean <B>createHighscoreEntry</B>(java.lang.String&nbsp;playername,
753
                                    int&nbsp;i,
754
                                    int&nbsp;j,
755
                                    int&nbsp;k)</PRE>
756
<DL>
757
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#createHighscoreEntry(java.lang.String, int, int, int)">SokobanTest</A></CODE></B></DD>
758
<DD>Creates a new entry in the highscore list if the given data describes a
759
 new highscore entry. If the specified entry already exists or has too
760
 many steps to be a highscore, nothing happens and false is returned.
761
<P>
762
<DD><DL>
763
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#createHighscoreEntry(java.lang.String, int, int, int)">createHighscoreEntry</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
764
</DD>
765
<DD><DL>
766
<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
767
 been reached<DD><CODE>j</CODE> - The count of moves the player has needed to complete the
768
 specified level<DD><CODE>k</CODE> - The time the player has needed to solve the level in seconds
769
<DT><B>Returns:</B><DD>True if a new entry in the highscore list has been created,
770
 otherwise false</DL>
771
</DD>
772
</DL>
773
<HR>
774
 
775
<A NAME="getBestPlayerName()"><!-- --></A><H3>
776
getBestPlayerName</H3>
777
<PRE>
778
public java.lang.String <B>getBestPlayerName</B>()</PRE>
779
<DL>
780
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getBestPlayerName()">SokobanTest</A></CODE></B></DD>
781
<DD>Gets the name of the best player (the one with with the least moves)
782
 over all levels. If Player A has completed level L1 with 10 moves and
783
 level L2 with 15 moves and player B has completed level L2 with 11 moves,
784
 the correct return value would be "A" as he has achieved to complete a
785
 level with only 10 moves.
786
 If the highscore list is empty, an empty string shall be returned.
787
<P>
788
<DD><DL>
789
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getBestPlayerName()">getBestPlayerName</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
790
</DD>
791
<DD><DL>
792
 
793
<DT><B>Returns:</B><DD>The name of the player with the least moves</DL>
794
</DD>
795
</DL>
796
<HR>
797
 
798
<A NAME="getCrateCount()"><!-- --></A><H3>
799
getCrateCount</H3>
800
<PRE>
801
public int <B>getCrateCount</B>()</PRE>
802
<DL>
803
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getCrateCount()">SokobanTest</A></CODE></B></DD>
804
<DD>Gets the total number of crates in the current levels
805
<P>
806
<DD><DL>
807
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getCrateCount()">getCrateCount</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
808
</DD>
809
<DD><DL>
810
 
811
<DT><B>Returns:</B><DD>The number of crates in the current level</DL>
812
</DD>
813
</DL>
814
<HR>
815
 
816
<A NAME="getGoalCount()"><!-- --></A><H3>
817
getGoalCount</H3>
818
<PRE>
819
public int <B>getGoalCount</B>()</PRE>
820
<DL>
821
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getGoalCount()">SokobanTest</A></CODE></B></DD>
822
<DD>Gets the total number of goals in the current levels
823
<P>
824
<DD><DL>
825
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getGoalCount()">getGoalCount</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
826
</DD>
827
<DD><DL>
828
 
829
<DT><B>Returns:</B><DD>The number of goals in the current level</DL>
830
</DD>
831
</DL>
832
<HR>
833
 
834
<A NAME="getHighscoreCount()"><!-- --></A><H3>
835
getHighscoreCount</H3>
836
<PRE>
837
public int <B>getHighscoreCount</B>()</PRE>
838
<DL>
839
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getHighscoreCount()">SokobanTest</A></CODE></B></DD>
840
<DD>Gets the count of entries in the highscore list
841
<P>
842
<DD><DL>
843
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getHighscoreCount()">getHighscoreCount</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
844
</DD>
845
<DD><DL>
846
 
847
<DT><B>Returns:</B><DD>The count of entries in the highscore list</DL>
848
</DD>
849
</DL>
850
<HR>
851
 
852
<A NAME="getLevelHeight()"><!-- --></A><H3>
853
getLevelHeight</H3>
854
<PRE>
855
public int <B>getLevelHeight</B>()</PRE>
856
<DL>
857
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getLevelHeight()">SokobanTest</A></CODE></B></DD>
858
<DD>Gets the current level's height
859
<P>
860
<DD><DL>
861
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getLevelHeight()">getLevelHeight</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
862
</DD>
863
<DD><DL>
864
 
865
<DT><B>Returns:</B><DD>The height of the current level</DL>
866
</DD>
867
</DL>
868
<HR>
869
 
870
<A NAME="getLevelWidth()"><!-- --></A><H3>
871
getLevelWidth</H3>
872
<PRE>
873
public int <B>getLevelWidth</B>()</PRE>
874
<DL>
875
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getLevelWidth()">SokobanTest</A></CODE></B></DD>
876
<DD>Gets the current level's width
877
<P>
878
<DD><DL>
879
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getLevelWidth()">getLevelWidth</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
880
</DD>
881
<DD><DL>
882
 
883
<DT><B>Returns:</B><DD>The width of the current level</DL>
884
</DD>
885
</DL>
886
<HR>
887
 
888
<A NAME="getWallCount()"><!-- --></A><H3>
889
getWallCount</H3>
890
<PRE>
891
public int <B>getWallCount</B>()</PRE>
892
<DL>
893
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getWallCount()">SokobanTest</A></CODE></B></DD>
894
<DD>Gets the total number of walls in the current levels
895
<P>
896
<DD><DL>
897
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getWallCount()">getWallCount</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
898
</DD>
899
<DD><DL>
900
 
901
<DT><B>Returns:</B><DD>The number of walls in the current level</DL>
902
</DD>
903
</DL>
904
<HR>
905
 
906
<A NAME="getWorkerPositionX()"><!-- --></A><H3>
907
getWorkerPositionX</H3>
908
<PRE>
909
public int <B>getWorkerPositionX</B>()</PRE>
910
<DL>
911
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getWorkerPositionX()">SokobanTest</A></CODE></B></DD>
912
<DD>Gets the Y coordinate of the worker's current position
913
<P>
914
<DD><DL>
915
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getWorkerPositionX()">getWorkerPositionX</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
916
</DD>
917
<DD><DL>
918
 
919
<DT><B>Returns:</B><DD>The worker's position's current Y coordinate</DL>
920
</DD>
921
</DL>
922
<HR>
923
 
924
<A NAME="getWorkerPositionY()"><!-- --></A><H3>
925
getWorkerPositionY</H3>
926
<PRE>
927
public int <B>getWorkerPositionY</B>()</PRE>
928
<DL>
929
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getWorkerPositionY()">SokobanTest</A></CODE></B></DD>
930
<DD>Gets the X coordinate of the worker's current position
931
<P>
932
<DD><DL>
933
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#getWorkerPositionY()">getWorkerPositionY</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
934
</DD>
935
<DD><DL>
936
 
937
<DT><B>Returns:</B><DD>The worker's position's current X coordinate</DL>
938
</DD>
939
</DL>
940
<HR>
941
 
942
<A NAME="isCrateAt(int, int)"><!-- --></A><H3>
943
isCrateAt</H3>
944
<PRE>
945
public boolean <B>isCrateAt</B>(int&nbsp;i,
946
                         int&nbsp;j)</PRE>
947
<DL>
948
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#isCrateAt(int, int)">SokobanTest</A></CODE></B></DD>
949
<DD>Gets whether there is a crate at the position identified by the specified
950
 X and Y coordinate
951
<P>
952
<DD><DL>
953
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#isCrateAt(int, int)">isCrateAt</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
954
</DD>
955
<DD><DL>
956
<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
957
<DT><B>Returns:</B><DD>True if there is a crate at the specified position, otherwise
958
 false</DL>
959
</DD>
960
</DL>
961
<HR>
962
 
963
<A NAME="isGoalAt(int, int)"><!-- --></A><H3>
964
isGoalAt</H3>
965
<PRE>
966
public boolean <B>isGoalAt</B>(int&nbsp;i,
967
                        int&nbsp;j)</PRE>
968
<DL>
969
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#isGoalAt(int, int)">SokobanTest</A></CODE></B></DD>
970
<DD>Gets whether there is a goal at the position identified by the specified
971
 X and Y coordinate
972
<P>
973
<DD><DL>
974
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#isGoalAt(int, int)">isGoalAt</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
975
</DD>
976
<DD><DL>
977
<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
978
<DT><B>Returns:</B><DD>True if there is a goal at the specified position, otherwise
979
 false</DL>
980
</DD>
981
</DL>
982
<HR>
983
 
984
<A NAME="isWallAt(int, int)"><!-- --></A><H3>
985
isWallAt</H3>
986
<PRE>
987
public boolean <B>isWallAt</B>(int&nbsp;i,
988
                        int&nbsp;j)</PRE>
989
<DL>
990
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#isWallAt(int, int)">SokobanTest</A></CODE></B></DD>
991
<DD>Gets whether there is a wall at the position identified by the specified
992
 X and Y coordinate
993
<P>
994
<DD><DL>
995
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#isWallAt(int, int)">isWallAt</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
996
</DD>
997
<DD><DL>
998
<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
999
<DT><B>Returns:</B><DD>True if there is a wall at the specified position, otherwise
1000
 false</DL>
1001
</DD>
1002
</DL>
1003
<HR>
1004
 
1005
<A NAME="clearHighscoreList()"><!-- --></A><H3>
1006
clearHighscoreList</H3>
1007
<PRE>
1008
public void <B>clearHighscoreList</B>()</PRE>
1009
<DL>
1010
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#clearHighscoreList()">SokobanTest</A></CODE></B></DD>
1011
<DD>Clears the highscore list. You can either remove all entries from the
1012
 "highscore.txt" file or remove the whole file. If there is no highscore
1013
 file at the moment, nothing should happen.
1014
<P>
1015
<DD><DL>
1016
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#clearHighscoreList()">clearHighscoreList</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
1017
</DD>
1018
<DD><DL>
1019
</DL>
1020
</DD>
1021
</DL>
1022
<HR>
1023
 
1024
<A NAME="moveWorkerSequence(java.lang.String)"><!-- --></A><H3>
1025
moveWorkerSequence</H3>
1026
<PRE>
1027
public void <B>moveWorkerSequence</B>(java.lang.String&nbsp;moves)</PRE>
1028
<DL>
1029
<DD><B>Description copied from interface: <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#moveWorkerSequence(java.lang.String)">SokobanTest</A></CODE></B></DD>
1030
<DD>Moves the worker with the steps specified in the move sequence string
1031
 which needs to be in the RLUD format.
1032
<P>
1033
<DD><DL>
1034
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html#moveWorkerSequence(java.lang.String)">moveWorkerSequence</A></CODE> in interface <CODE><A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test">SokobanTest</A></CODE></DL>
1035
</DD>
1036
<DD><DL>
1037
<DT><B>Parameters:</B><DD><CODE>moves</CODE> - The move sequence in the RLUD format</DL>
1038
</DD>
1039
</DL>
1040
<!-- ========= END OF CLASS DATA ========= -->
1041
<HR>
1042
 
1043
 
1044
<!-- ======= START OF BOTTOM NAVBAR ====== -->
1045
<A NAME="navbar_bottom"><!-- --></A>
1046
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
1047
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
1048
<TR>
1049
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1050
<A NAME="navbar_bottom_firstrow"><!-- --></A>
1051
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
1052
  <TR ALIGN="center" VALIGN="top">
1053
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
1054
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
1055
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1056
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1057
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1058
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1059
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1060
  </TR>
1061
</TABLE>
1062
</TD>
1063
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1064
</EM>
1065
</TD>
1066
</TR>
1067
 
1068
<TR>
1069
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1070
&nbsp;<A HREF="../../../gdi/ws0809/test/SokobanTest.html" title="interface in gdi.ws0809.test"><B>PREV CLASS</B></A>&nbsp;
1071
&nbsp;<A HREF="../../../gdi/ws0809/test/SokobanTestExtended1.html" title="class in gdi.ws0809.test"><B>NEXT CLASS</B></A></FONT></TD>
1072
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1073
  <A HREF="../../../index.html?gdi/ws0809/test/SokobanTestAdapter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
1074
&nbsp;<A HREF="SokobanTestAdapter.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
1075
&nbsp;<SCRIPT type="text/javascript">
1076
  <!--
1077
  if(window==top) {
1078
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
1079
  }
1080
  //-->
1081
</SCRIPT>
1082
<NOSCRIPT>
1083
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
1084
</NOSCRIPT>
1085
 
1086
 
1087
</FONT></TD>
1088
</TR>
1089
<TR>
1090
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1091
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
1092
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1093
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
1094
</TR>
1095
</TABLE>
1096
<A NAME="skip-navbar_bottom"></A>
1097
<!-- ======== END OF BOTTOM NAVBAR ======= -->
1098
 
1099
<HR>
1100
 
1101
</BODY>
1102
</HTML>