package genesom;


public class WinnerVisitor
  extends NodeVisitor
{
  protected NeighbourhoodFunction nhf;

  public WinnerVisitor() {}

  public void setCallback(Object o) { nhf = (NeighbourhoodFunction)o; }

  public boolean at(Node curr_node)
  {
    int dist = map.nodeDistance(start_node, curr_node);

    ((Node)curr_node).updateWinner(nhf.value(dist));

    return true;
  }

}
