Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uchicago.src.repastdemos.sugarscape
Class SugarAgent

    java.lang.Object
      uchicago.src.repastdemos.sugarscape.SugarAgent

All Implemented Interfaces:
  Drawable

    public class SugarAgent

extends java.lang.Object
implements Drawable

The agent for the sugar scape simulation. This agent implements movement rule M, pg. 182, where best is defined by most sugar at the closest location.

The source is annotated so see that for more info.

Version:
  $Revision: 1.1 $ $Date: 2005/08/12 20:04:53 $
Author:
  Nick Collier

Constructor Summary
`SugarAgent(SugarSpace ss, SugarModel model)`

Method Summary
`void` | `draw(SimGraphics g)` Invoked when the object should draw itself
`int` | `getCurrentAge()`
`int` | `getMaxAge()`
`int` | `getMetabolism()`
`int` | `getSugar()`
`int` | `getVision()`
`int` | `getX()` Gets the x coordinate of this drawable.
`int` | `getY()` Gets the y coordinate of the this drawable.
`void` | `setMaxAge(int age)`
`void` | `setMetabolism(int meta)`
`void` | `setSugar(int sugar)`
`void` | `setVision(int vis)`
`void` | `setXY(int x, int y)`
`void` | `step()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SugarAgent

    public SugarAgent(SugarSpace ss,
                      SugarModel model)

Method Detail

### setXY

    public void setXY(int x,
                      int y)

### getX

    public int getX()

  Description copied from interface: `Drawable`
  Gets the x coordinate of this drawable. Note that this should return the x coordinate in some space, not necessarily a screen coordinate.

  Specified by:
    `getX` in interface `Drawable`

### getY

    public int getY()

  Description copied from interface: `Drawable`
  Gets the y coordinate of the this drawable. Note that this should return the y coordinate in some space, not necessarily a screen coordinate.

  Specified by:
    `getY` in interface `Drawable`

### setMetabolism

    public void setMetabolism(int meta)

### setVision

    public void setVision(int vis)

### getMetabolism

    public int getMetabolism()

### getVision

    public int getVision()

### setSugar

    public void setSugar(int sugar)

### getSugar

    public int getSugar()

### getMaxAge

    public int getMaxAge()

### setMaxAge

    public void setMaxAge(int age)

### getCurrentAge

    public int getCurrentAge()

### step

    public void step()

### draw

    public void draw(SimGraphics g)

  Description copied from interface: `Drawable`
  Invoked when the object should draw itself

  Specified by:
    `draw` in interface `Drawable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD