import java.awt.*;

class GENERIC_CELL{
  int x, y, value;
  Color c;

  GENERIC_CELL(int v, int xx, int yy, Color cc){
    x = xx;
    y = yy;
    c = cc;
    value = v;
  }

  public void moveX(int n){
    x += 20 * n;
  }

  public void moveDown(){
    y+=2;
  }

  public int getValue(){
    return value;
  }

  public void setValue(int v){
    value=v;
  }

  public void draw(Graphics g){
    if(value!=0){
      g.setColor(c);
      g.fillRect(x,y,20,15);
      g.setColor(Color.black);
      g.drawString(""+value, x+5,y+13);
    }
  }
}

