se.liu.student.kimgr905.tilegame
Class TileMap

java.lang.Object
  extended by se.liu.student.kimgr905.tilegame.TileMap

public final class TileMap
extends java.lang.Object

Class for handling a TileMap. Contains a linked list of sprites and two sprite objects: player and boss.


Field Summary
private  Sprite boss
           
private  Sprite player
           
private  java.util.LinkedList<Sprite> sprites
           
 
Constructor Summary
TileMap()
          Creates a new TileMap object, with a emty LinkedList.
 
Method Summary
 void addSprite(Sprite sprite)
          Adds a Sprite to the LinkedList.
 Sprite getBoss()
          Gets the boss from the TileMap (as a Sprite object).
 Sprite getPlayer()
          Gets the player from the TileMap (as a Sprite object).
 java.util.Iterator<Sprite> getSprites()
          Gets a iterator for the LinkedList.
 void removeSprite(Sprite sprite)
          Removes a Sprite from the LinkedList.
 void setBoss(Sprite boss)
          Sets the boss on the TileMap (as a Sprite object).
 void setPlayer(Sprite player)
          Sets the player on the TileMap (as a Sprite object).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sprites

private final java.util.LinkedList<Sprite> sprites

player

private Sprite player

boss

private Sprite boss
Constructor Detail

TileMap

public TileMap()
Creates a new TileMap object, with a emty LinkedList.

Method Detail

getPlayer

public Sprite getPlayer()
Gets the player from the TileMap (as a Sprite object).

Returns:
player see above

setPlayer

public void setPlayer(Sprite player)
Sets the player on the TileMap (as a Sprite object).

Parameters:
player - see above

getBoss

public Sprite getBoss()
Gets the boss from the TileMap (as a Sprite object).

Returns:
boss see above

setBoss

public void setBoss(Sprite boss)
Sets the boss on the TileMap (as a Sprite object).

Parameters:
boss - see above

addSprite

public void addSprite(Sprite sprite)
Adds a Sprite to the LinkedList.

Parameters:
sprite - see above

removeSprite

public void removeSprite(Sprite sprite)
Removes a Sprite from the LinkedList.

Parameters:
sprite - see above

getSprites

public java.util.Iterator<Sprite> getSprites()
Gets a iterator for the LinkedList.

Returns:
Iterator see above