Interface SimulatorView

All Known Implementing Classes:
GraphView, GridView

public interface SimulatorView

A graphical view of the simulation grid. This interface defines all possible different views.

Version:
2011.07.31
Author:
Michael Kölling and David J. Barnes

Method Summary
 boolean isViable(Field field)
          Determine whether the simulation should continue to run.
 void reset()
          Prepare for a new run.
 void setColor(Class animalClass, Color color)
          Define a color to be used for a given class of animal.
 void showStatus(int step, Field field)
          Show the current status of the field.
 

Method Detail

isViable

boolean isViable(Field field)
Determine whether the simulation should continue to run.

Returns:
true If there is more than one species alive.

reset

void reset()
Prepare for a new run.


setColor

void setColor(Class animalClass,
              Color color)
Define a color to be used for a given class of animal.

Parameters:
animalClass - The animal's Class object.
color - The color to be used for the given class.

showStatus

void showStatus(int step,
                Field field)
Show the current status of the field.

Parameters:
step - Which iteration step it is.
field - The field whose status is to be displayed.