public int numOfLiberties()
	{

		// For each piece in pieces
		for (Piece p : pieces)
		{
			// GEt the location
			int row = p.where.row;
			int col = p.where.col;
			// check to see wether the pieces are in certain positions(edges of the board) and
			// otherwise if there isnt anything next to that particular stone add however many
			// necessary pieces to the group
			if (row > 0 && game.squares[row - 1][col].piece == null)
			{
				liberties.add(game.squares[row - 1][col]);
			}
			if (col > 0 && game.squares[row][col - 1].piece == null)
			{
				liberties.add(game.squares[row][col - 1]);
			}
			if (row < 8 && game.squares[row + 1][col].piece == null)
			{
				liberties.add(game.squares[row + 1][col]);
			}
			if (col < 8 && game.squares[row][col + 1].piece == null)
			{
				liberties.add(game.squares[row][col + 1]);
			}
		}
		//returns the size of the liberties 
		return liberties.size();
	}