To load this file without formatting, visit http://whoyouknow.co.uk/ants/java/17.1/src/ants/PheromoneParticle.java. This is a spam-protection measure; sorry for the inconvenience.

· PheromoneParticle.java ·

   1/*
   2 * PheromoneParticle.java
   3 *
   4 * Created on 16 February 2007, 02:51
   5 *
   6 * To change this template, choose Tools | Template Manager
   7 * and open the template in the editor.
   8 */
   9
  10package ants;
  11
  12/**
  13 *
  14 * @author James Hamilton
  15 */
  16public class PheromoneParticle {
  17    
  18    private Ant ant = null;
  19    private int direction = AWAY_FROM_NEST;
  20
  21    public static final int TOWARD_NEST = 1;
  22    public static final int AWAY_FROM_NEST = 2;
  23    
  24    /** Creates a new instance of PheromoneParticle */
  25    public PheromoneParticle(Ant ant, int direction) {
  26        this.setAnt(ant);
  27        this.setDirection(direction);
  28    }
  29
  30    public Ant getAnt() {
  31        return ant;
  32    }
  33
  34    public void setAnt(Ant ant) {
  35        this.ant = ant;
  36    }
  37
  38    public int getDirection() {
  39        return direction;
  40    }
  41
  42    public void setDirection(int direction) {
  43        this.direction = direction;
  44    }
  45    
  46}
  47

· PheromoneParticle.java ends ·

Generated by CHIP: Code Highlighting in PHP, version 2.7.0.