appletbots.gatherers
Class Food

java.lang.Object
  extended by appletbots.WorldObject
      extended by appletbots.CarriableObject
          extended by appletbots.gatherers.Food

public class Food
extends CarriableObject

The class represents a piece of food in the appletbots world

Author:
Erik Rasmussen

Field Summary
 
Fields inherited from class appletbots.WorldObject
color, mass, maxSpeed, size
 
Constructor Summary
Food(int size, double maxSpeed, double mass, java.awt.Color color)
          Constructs a food with the given size (radius), maxSpeed, mass, and color.
 
Method Summary
 
Methods inherited from class appletbots.CarriableObject
getCarriedBy, isCarried, setCarriedBy
 
Methods inherited from class appletbots.WorldObject
collidedWith, getColor, getMass, getMaxSpeed, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Food

public Food(int size,
            double maxSpeed,
            double mass,
            java.awt.Color color)
Constructs a food with the given size (radius), maxSpeed, mass, and color.

Parameters:
size - The radius of the food
maxSpeed - The maximum speed of the food
mass - The mass of the food
color - The color of the food