public void paintPatch(Graphics g, Patch p, int x, int y, int CellSize) { if (p.getVariableValue("lifeValue") == 0) g.setColor(Color.black); else g.setColor(Color.red); g.fillRect(x, y, CellSize, CellSize); }