edu.gatech.cs2335.lemmings.engine
Class Map

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.engine.Map

public class Map
extends java.lang.Object

The map on which stuff will be happening.

Author:
Vladimir Urazov, Jose Caban

Constructor Summary
Map()
          Creates a new Map instance.
 
Method Summary
 void addShape(java.awt.Shape shape, java.awt.Color color)
          When someone creates something on the map, the thing will be added to the map.
 java.awt.image.BufferedImage createGameMap()
          This will create a Game Map for use in drawing to screen.
 java.awt.image.BufferedImage getBackground()
          Access method for the background property.
 java.awt.image.BufferedImage getGameMap()
          Describe getGameMap method here.
 java.awt.image.BufferedImage getMap()
          Access method for the map property.
 java.awt.Dimension getSize()
          Access method for the size property.
 java.awt.image.BufferedImage getTexture()
          Access method for the texture property.
 java.awt.image.BufferedImage getUnbreakableTexture()
          Method getUnbreakableTexture
 AnimatedSprite getWaterAnimation()
          Returns the water animation.
static void main(java.lang.String[] args)
          Main
 void setBackground(java.awt.image.BufferedImage aBackground)
          Sets the value of the background property.
 void setMap(java.awt.image.BufferedImage aMap)
          Sets the value of the map property.
 void setTexture(java.awt.image.BufferedImage aTexture)
          Sets the value of the texture property.
 void setUnbreakableTexture(java.awt.image.BufferedImage unbreakableTexture)
          Method setUnbreakableTexture
 void setWaterAnimation(TileSet set)
          Describe setWaterAnimation method here.
 void subtractShape(java.awt.Shape shape)
          When something explodes, digs, or mines, some part of the map can be destroyed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Map

public Map()
Creates a new Map instance.

Method Detail

getBackground

public java.awt.image.BufferedImage getBackground()
Access method for the background property.

Returns:
the current value of the background property

setBackground

public void setBackground(java.awt.image.BufferedImage aBackground)
Sets the value of the background property.

Parameters:
aBackground - the new value of the background property

getTexture

public java.awt.image.BufferedImage getTexture()
Access method for the texture property.

Returns:
the current value of the texture property

setTexture

public void setTexture(java.awt.image.BufferedImage aTexture)
Sets the value of the texture property.

Parameters:
aTexture - the new value of the texture property

setUnbreakableTexture

public void setUnbreakableTexture(java.awt.image.BufferedImage unbreakableTexture)
Method setUnbreakableTexture

Parameters:
unbreakableTexture - ub

getUnbreakableTexture

public java.awt.image.BufferedImage getUnbreakableTexture()
Method getUnbreakableTexture

Returns:
BufferedImage

getMap

public java.awt.image.BufferedImage getMap()
Access method for the map property.

Returns:
the current value of the map property

setMap

public void setMap(java.awt.image.BufferedImage aMap)
Sets the value of the map property.

Parameters:
aMap - the new value of the map property

getGameMap

public java.awt.image.BufferedImage getGameMap()
Describe getGameMap method here.

Returns:
a BufferedImage value

getSize

public java.awt.Dimension getSize()
Access method for the size property.

Returns:
the current value of the size property

getWaterAnimation

public AnimatedSprite getWaterAnimation()
Returns the water animation.

Returns:
an AnimatedSprite value

setWaterAnimation

public void setWaterAnimation(TileSet set)
Describe setWaterAnimation method here.

Parameters:
set - a TileSet value

createGameMap

public java.awt.image.BufferedImage createGameMap()
This will create a Game Map for use in drawing to screen. Parses the Mask and Texture File to spit out a map.

Returns:
the new gameMap to draw to screen.

addShape

public void addShape(java.awt.Shape shape,
                     java.awt.Color color)
When someone creates something on the map, the thing will be added to the map. Use this method.

Parameters:
shape - The shape to add to the map.
color - The color of the shape

subtractShape

public void subtractShape(java.awt.Shape shape)
When something explodes, digs, or mines, some part of the map can be destroyed. This is where this function is called. The shape passed in is what will be removed from the map. Note that only "diggable" elements will be removed. The undiggable ones will still persist.

Parameters:
shape - The shape to remove from the map.

main

public static void main(java.lang.String[] args)
Main

Parameters:
args - args