public void populate() {
        // Make certain there is room for everything
        int oceanSize = nRows * nColumns;
        int nSharks = Parameters.numberOfSharks;
        int nFish = Parameters.numberOfFish;
        if (nSharks + nFish > 0.95 * oceanSize) {
            throw new RuntimeException("Ocean is too crowded.");
        }
        // Place the sharks
        for (int i = 0; i < nSharks; i += 1) {
            int[] location = findEmptyLocation();
            array[location[0]][location[1]] = new Shark(location[0], location[1]);
        }
        // Place the fish
        for (int i = 0; i < nFish; i += 1) {
            int[] location = findEmptyLocation();
            array[location[0]][location[1]] = new Fish(location[0], location[1]);
        }
    }