Class Building

java.lang.Object
  extended by Building

public class Building
extends java.lang.Object

This class represents a building in the gorilla game. A building knows its position in the game, its dimensions and its color.

Constructor Summary
Building(int left, int bottom, int height, int width, java.awt.Color color)
          Makes a new building
 
Method Summary
 int getBottom()
          Returns the distance of the bottom left corner of the building from the bottom edge of the game area.
 java.awt.Color getColor()
          Returns the color of the building.
 int getHeight()
          Returns the height of the building.
 int getLeft()
          Returns the distance of the bottom left corner of the building from the left edge of the game area.
 int getWidth()
          Returns the width of the building.
 java.lang.String toString()
          Returns information about this building in String form.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Building

public Building(int left,
                int bottom,
                int height,
                int width,
                java.awt.Color color)
Makes a new building

Parameters:
left - The distance of the bottom left corner of the building from the left edge of the game area.
bottom - The distance of the bottom left corner of the building from the bottom edge of the game area.
height - The height of the building.
width - The width of the building.
color - The color of the building
Method Detail

getLeft

public int getLeft()
Returns the distance of the bottom left corner of the building from the left edge of the game area.

Returns:
the distance of the bottom left corner of the building from the left edge of the game area.

getBottom

public int getBottom()
Returns the distance of the bottom left corner of the building from the bottom edge of the game area.

Returns:
the distance of the bottom left corner of the building from the bottom edge of the game area.

getHeight

public int getHeight()
Returns the height of the building.

Returns:
the height of the building.

getWidth

public int getWidth()
Returns the width of the building.

Returns:
the width of the building.

getColor

public java.awt.Color getColor()
Returns the color of the building.

Returns:
the color of the building.

toString

public java.lang.String toString()
Returns information about this building in String form.

Overrides:
toString in class java.lang.Object