Class MapItemFactory
java.lang.Object
edu.uoc.pacman.model.entities.items.MapItemFactory
Entity Simple Factory class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MapItem
getItemMapInstance
(int x, int y, char itemMapSymbol) Returns a newMapItem
object.
-
Constructor Details
-
MapItemFactory
public MapItemFactory()
-
-
Method Details
-
getItemMapInstance
public static MapItem getItemMapInstance(int x, int y, char itemMapSymbol) throws IllegalStateException Returns a newMapItem
object.- Parameters:
x
- Column of the coordinate/position in which the item is in the board.y
- Row of the coordinate/position in which the item is in the board.itemMapSymbol
- String value of theMapItem
enumeration that corresponds to the item of the map.- Returns:
MapItem
object.- Throws:
IllegalStateException
- When a wrong symbol is used as an argument.
-