public boolean CheckLigneId(Position pos, int n,int id)
    {
        int x=pos.x;
        int y=pos.y;
        int y_end=y + n;  
        while(y <= largeur && y< y_end && etatPlateau[x-1][y-1] == id)
        {
            y++;
        }
        if(y == y_end )
        {
            return true;
        }
        else
        {
            return false;
        }
    }