public ArrayList<BoardPosition> scoreCloisters(ArrayList<Player> players,
			boolean hasGameEnded) {

		ArrayList<BoardPosition> removedMeeples = new ArrayList<BoardPosition>();
		Iterator<Meeple> iter = meeplePlacement.keySet().iterator();

		// For each meeple which is placed we check to see if it is placed on
		// a cloister. Then depending on this and the game state we score.
		while (iter.hasNext()) {

			Meeple meeple = iter.next();
			BoardPosition meeplePosition = meeplePlacement.get(meeple);

			// Check to see if it is attached to a cloister.
			Tile tile = gameBoard[meeplePosition.yBoard][meeplePosition.xBoard];
			TileType tileType = tile.getTileType(meeplePosition.xTile,
					meeplePosition.yTile);

			// If it is attached to a cloister.
			if (tileType == TileType.CLOISTER) {
				// If all 8 neighbor tiles are not null.
				Point tilePosition = getTilePosition(tile);
				int xIile = tilePosition.x;
				int yTile = tilePosition.y;

				Tile nTile = gameBoard[xIile][yTile - 1];
				Tile neTile = gameBoard[xIile + 1][yTile - 1];
				Tile eTile = gameBoard[xIile + 1][yTile];
				Tile seTile = gameBoard[xIile + 1][yTile + 1];
				Tile sTile = gameBoard[xIile][yTile + 1];
				Tile swTile = gameBoard[xIile - 1][yTile + 1];
				Tile wTile = gameBoard[xIile - 1][yTile];
				Tile nwTile = gameBoard[xIile - 1][yTile - 1];

				Tile[] neighborTiles = { nTile, neTile, eTile, seTile, sTile,
						swTile, wTile, nwTile };

				int numNeighborTiles = 0;

				// Count the number of placed (non-null) neighbor tiles.
                for (Tile neighborTile : neighborTiles) {
                    if (neighborTile != null) {
                        numNeighborTiles++;
                    }
                }

				// Score if the game has ended, or score if the game
				// is still being played and the cloister is complete.
				if (hasGameEnded || (!hasGameEnded && numNeighborTiles == 8)) {

					// TODO something is wrong;
					// after all 8 neighbor tiles were placed the meeple wasn't
					// removed. however end-game scoring removed it.

					// Find out which player owns the meeple.
					Player scorer = null;

                    for (Player player : players) {
                        if (player.getMeeples().contains(meeple)) {
                            scorer = player;
                        }
                    }

					// Then add to the player's score.
					int playerScore = scorer.getScore();
					scorer.setScore(playerScore + numNeighborTiles + 1);

					// And remove the meeple from the tile.
					removedMeeples.add(meeplePlacement.get(meeple));
					meeplePlacement.remove(meeple);

					// Since we are iterating through meeplePlacement
					// we need to refresh it when it's altered.
					iter = meeplePlacement.keySet().iterator();
				}
			}
		}

		return removedMeeples;
	}