be.madoka.aardbei.sokoban.logic.loader
Class XMLSokoLoader

java.lang.Object
  |
  +--be.madoka.aardbei.sokoban.logic.loader.XMLSokoLoader
All Implemented Interfaces:
SokoLoader

public class XMLSokoLoader
extends java.lang.Object
implements SokoLoader

Author:
Tim Van Wassenhove

Constructor Summary
XMLSokoLoader(SokoLogic logic, java.lang.String fileName)
          Default constructor.
 
Method Summary
 World getWorld(int level)
          Loads the World belonging to the given level.
 boolean hasMoreWorlds()
          Tests if another World is available.
 boolean hasWorld(int level)
          Tests if the requested World is available.
 World nextWorld()
          Loads the next World.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLSokoLoader

public XMLSokoLoader(SokoLogic logic,
                     java.lang.String fileName)
Default constructor.

Parameters:
fileName - the fileName
Method Detail

hasMoreWorlds

public boolean hasMoreWorlds()
Description copied from interface: SokoLoader
Tests if another World is available.

Specified by:
hasMoreWorlds in interface SokoLoader
Returns:
a boolean specifying if at least one more world can be loaded

nextWorld

public World nextWorld()
Description copied from interface: SokoLoader
Loads the next World.

Specified by:
nextWorld in interface SokoLoader
Returns:
a World

getWorld

public World getWorld(int level)
Description copied from interface: SokoLoader
Loads the World belonging to the given level.

Specified by:
getWorld in interface SokoLoader
Parameters:
level - the level
Returns:
a World

hasWorld

public boolean hasWorld(int level)
Description copied from interface: SokoLoader
Tests if the requested World is available.

Specified by:
hasWorld in interface SokoLoader
Returns:
a boolean specifying if the requested level is available