New method to see if a jail has an empty cell

This commit is contained in:
graywolf336 2015-06-03 11:33:37 -05:00
parent 82487805b4
commit 68e35ed271

View File

@ -223,6 +223,15 @@ public class Jail {
return null; return null;
} }
/** Checks if there is an empty cell in this Jail. */
public boolean hasEmptyCell() {
for(Cell c : getCells())
if(!c.hasPrisoner())
return true;
return false;
}
/** Gets the amount of cells the jail. */ /** Gets the amount of cells the jail. */
public int getCellCount() { public int getCellCount() {