|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--nu.dll.pong.LevelLoader
Loads level data from a text file or input stream. See data/levels.txt in the jar file for samples.
| Constructor Summary | |
LevelLoader(java.io.File f)
Loads level data from the given file. |
|
LevelLoader(java.io.InputStream is)
Loads level data from the given InputStream. |
|
| Method Summary | |
Level |
getLevel(int no)
Returns the level with the given number or null if that level isn't available. |
int |
levelCount()
Returns the total number of levels loaded into this object. |
Level |
randomLevel()
Generates and returns a random level. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LevelLoader(java.io.File f)
throws java.io.IOException
public LevelLoader(java.io.InputStream is)
throws java.io.IOException
| Method Detail |
public Level randomLevel()
public Level getLevel(int no)
null if that level isn't available.public int levelCount()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||