import java.awt.*;

// A cell in the Game of Life.
// ----------------------------------------------------------------------
public abstract class Cell {

    // What I look like printed in text.
    char ident;
    
    // My size.  The amount of space in which a cell is drawn.
    protected static int size = 20;

    // The color to use when displaying myself.
    Color c;


    // Given the number numNeighbours of surrounding cells,
    // return the type of Cell I will be in the next generation. 
    // ------------------------------------------------------------------
    public abstract Cell evolve (int numNeighbours);


    // Print my text character to standard output.
    // ------------------------------------------------------------------
    public void showText () {
        System.out.print (ident);
    }


    // Display myself at (x,y) on the Graphics port g.
    // ------------------------------------------------------------------
    public void display (int x, int y, Graphics g) {
        g.setColor(c);
        g.fillRoundRect(x-(size/2), y-(size/2), size-4, size-4, (size-4)/4, (size-4)/4);
    }
}
