moagg.model.level
Class Map
java.lang.Object
moagg.model.level.Map
public class Map
- extends java.lang.Object
Constructor Summary |
Map(int w,
int h)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Map
public Map(int w,
int h)
getWidth
public int getWidth()
getHeight
public int getHeight()
setImage
public void setImage(java.awt.image.BufferedImage image)
getImage
public java.awt.image.BufferedImage getImage()
setRGB
public void setRGB(int[] rgb)
getRGB
public int[] getRGB()
markAsForegroundTile
public void markAsForegroundTile(int x,
int y)
isBackgroundTile
public boolean isBackgroundTile(int x,
int y)
- Determines whether the given tile is background only.
- Parameters:
x
- The x index of the tile.y
- The y index of the tile.
- Returns:
- true, if the given tile is background, else false.
If x/y lies out of bounds, false is returned.
isBackgroundBetween
public boolean isBackgroundBetween(int x1,
int y1,
int x2,
int y2)
- Determines whether the map only contains background between the two given tiles.
- Parameters:
x1
- The x index of the first tile.y1
- The y index of the first tile.x2
- The x index of the second tile.y2
- The y index of the second tile.
- Returns:
- true, if there's only background between the two tiles, else false.
Copyright © 2008. All Rights Reserved.