@Override
	public MinesweeperTile[] getSurroundingTiles() {

		ArrayList<MinesweeperTile> surrondingList = new ArrayList<MinesweeperTile>(8);
		for (int x = xPos - 1 ; x <= xPos + 1; x++) {
			for (int y = yPos - 1 ; y <= yPos + 1; y++) {
				if (x >= 0 && y >= 0 && x < board.amountOfTiles.width && y < board.amountOfTiles.height && !(xPos == x && yPos == y))
					surrondingList.add(board.theGame[x][y]);
			}
		}

		MinesweeperTile[] tiles = new MinesweeperTile[surrondingList.size()];
		int tileIndex = 0;
		for (MinesweeperTile tile : surrondingList){
			tiles[tileIndex++] = tile;
		}

		return tiles;
	}