import java.util.ArrayList;

import Prisoner;

public class Cell {

private int numContained = 0;

private int maxContained;

private ArrayList cellPrisoners = new ArrayList();

private String material = "";

public int x, y;

// CONSTRUCTOR

Cell (int max, String material, int x, int y) {

maxContained = max;

this.material = material.toLowerCase();

}

// METHODS

public boolean isCellFull() {

// returns true if this cell is full...

return (numContained == maxContained);

}

public void addPrisoner(Prisoner newPrisoner) {

// add a prisoner into the cell.

}

public void removePrisoner(Prisoner outPrisoner) {

for (int prisonerCount=0; prisonerCount < cellPrisoners.size(); prisonerCount++) {

if ((Prisoner)cellPrisoners.get(prisonerCount) == outPrisoner)

cellPrisoners.remove(prisonerCount);

}

¡@

// remove a prisoner from the cell.

        }

public String materialType() {

return material;

}