Class BasicScreen


public class BasicScreen
implements Screen

This class is a very basic implementation of the Screen interface. You will
write your own, but this one is included for the first assignment.


Constructor Summary
BasicScreen()
           
BasicScreen(int sx, int sy)
           

Method Summary
 voidaddEntity(GameEntity ge)
           
 IteratorcreateEntityIterator()
          Returns an Iterator object that can be used to "walk through" the list of
entities on this screen.
 ContainereditPropertiesPanel()
           
 BlockgetBlock(int x, int y)
           
 BlockgetBlockOfType(int type)
           
 GameEntitygetEntityOfType(int type)
           
 intgetNumBlockTypes()
           
 intgetNumEntityTypes()
           
 DimensiongetSize()
           
 voidremoveEntity(GameEntity ge)
           
 voidsetBlock(int x, int y, Block b)
           

Constructor Detail

BasicScreen

public BasicScreen()

BasicScreen

public BasicScreen(int sx, int sy)
Method Detail

addEntity

public void addEntity(GameEntity ge)

createEntityIterator

public Iterator createEntityIterator()
Returns an Iterator object that can be used to "walk through" the list of
entities on this screen. See java.util.Iterator for the methods of the
Iterator interface. All of the objects returned by the iterator should
be of type GameEntity. If they aren't the display code will throw an
exception when it tries to draw them.
Returns: An Iterator object that will walk the list of entities on this screen.
seealso <{Iterator}>

editPropertiesPanel

public Container editPropertiesPanel()

getBlock

public Block getBlock(int x, int y)

getBlockOfType

public Block getBlockOfType(int type)

getEntityOfType

public GameEntity getEntityOfType(int type)

getNumBlockTypes

public int getNumBlockTypes()

getNumEntityTypes

public int getNumEntityTypes()

getSize

public Dimension getSize()

removeEntity

public void removeEntity(GameEntity ge)
throws java.util.NoSuchElementException

setBlock

public void setBlock(int x, int y, Block b)

Association Links

to Class GameEntityList