I'm creating a tile based game similar to . When a user clicks on a tile and its not a mine or a number space I need to search and expose the adjacent tiles that are empty and stop when it hits a number or the edge of the board. I have it working right now so that it will clear the row of the tile clicked and stop at a numbered tile or the edge of the board. What I have is going to get ugly quickly and I am sure there is a easier way of doing this. Is there a searching algorithm I can use that will find all adjacent tiles to the one the player click only stopping once it hits the edge of the board or hit a numbered tile?
I'm currently making a Minesweeper in C#. I've already done the basics (generating minefield, rules and ui) but I don't know how I should implement when the user clicks a cell and the cell has no mines nearby and clicks nearby cells with also no mines nearby, like this:    And after click    This is my current code on this:  if (MineField(x,y) == false) // If the clicked cell isn't a mine {     if (GetNeighbours(x,y) == 0) // GetNeighbours returns the amount of mines in the closest 8 cells     {         // To be honest, no idea...     } }
Showing that $X^2$ and $X^3$ are irreducible but not prime in $K[X^2,X^3]$ Show that $X^2$ and $X^3$ are irreducible but not prime in $K[X^2,X^3]$.   My reasoning is as follows:  Since the only ways $X^2$ and $X^3$ can be factored in $K[X^2,X^3]$ are $X^2 = X^2 * 1$ and $X^3=X^3*1$ it follows that $X^2$ and $X^3$ are irreducible.  To show that they are not prime in $K[X^2,X^3]$ I argue that $X^2\mid X^3*X^3$ but $X^2\nmid X^3$ and $X^3\mid X^4*X^2$ but $X^3\nmid X^4$ or $X^3\nmid X^2$.  Is that correct? Can Mjolnir be lifted & wielded by anyone if Thor is touching it? In The Big Bang Theory episode , Penny, Amy, and Bernadette are having an argument if Thor's hammer:   Can be lifted by anyone in space.     Can be lifted &amp; wielded by anyone if Thor is touching it.   The first argument is settled in .  But the second argument remains unsolved.  Can Thor's hammer be lifted &amp; wielded by anyone if Thor is touching it? How do I set up a folder so that anything created in it inherits permissions? Difference between processing.runalg() and general.runalg() In the discussion from a question I asked several days ago (), someone suggested that I use general.runalg() instead of processing.runalg() for running QGIS algorithms.    I've now used both, and haven't noticed a difference in either performance or syntax between them.  I'm just wondering what sort of differences there are between these two methods, and which one I should be using. After drinking an energy drink, there are little yellow and white bars above the health bar. What are those? What do they represent? Helix in a helix I am trying to work out a "helix in a helix" mathematically.  Intuitively I think of this as a steel cable, which is made up of a number of smaller steel cables all bound together in spiral.  If I wanted to find the length of one of the individual cables, it would be bound in a spiral in the smaller cable and then those cables bound in a larger spiral cable.  I know that if I wanted to do a helix whose ends meet, I would use the parametrization $$((a+b\cos(\omega{t}))\cos{t},(a+b\cos(\omega{t})\sin{t},b\sin(\omega{t})),t=0..2\pi$$ I've been trying to map out in my head how to, instead of curling the helix, making the helix travel in the path of a helix.  I've achieved it partially with $$((a+b\cos(\omega{t}))\cos{t},(a+b\cos(\omega{t})\sin{t},t),t=0..\infty$$ But this doesn't keep the smaller helix in tact, and turns it into a sine wave helix.  I've also tried  $$((a+b\cos(\omega{t}))\cos{t},(a+b\cos(\omega{t})\sin{t},tb\sin(\omega{t})),t=0..2\pi$$ But this gives me sort of a nautilus shape where the helix curls into itself and increases in size and curls around into itself.  What am I missing?  EDIT:  Also, what if we wanted to do this again, like a 'helix in a helix in a ... in a helix'? As we know a first order theory $T$ is finitely axiomatizable if there is a finite set $F\subseteq T$ of axioms such that $F\vdash \sigma$ for every $\sigma \in T$.   How we can prove if $\mathsf{ZF}$ is consistent, then $\mathsf{ZF}$ is not finitely axiomatizable? By using the Reflection Theorem or any other if we could use? What to do when the correct answer to a question changes over time? My question concerns . I asked the question, and at the time selected the correct answer. However, time passes and libraries get updated, and now a different answer is actually correct.   I should probably select this new answer as the correct answer, but I feel bad for the person that will lose 15 reputation points even though is answer was the a good answer at that given point in time.  Any suggestions? How can I get rid of ants in an environmently friendly way? Is my MAC address public when browsing the Internet? Today my lecturer put up on the board that:  If $\lim\limits_{n\to\infty}\frac{a_{n+1}}{a_n}$ exists and $a_n&gt;0$ then   $\displaystyle \limsup\limits_{n\to\infty}\left(a_n^{\frac{1}{n}}\right)=\lim_{n\to\infty}\frac{a_{n+1}}{a_n}$  however I am not sure why this is true, can somebody give me a hint or something as to how to go about proving this.  thanks for any help How to show hidden folders in File Manager (Nautilus) on Ubuntu? I want to disable Bluetooth on my laptop running Windows 10 Pro x64, but I have a problem: the option to do so is missing even though I know that it was previously available.  Here is the Bluetooth settings pages should look like on Windows 10:    Here is how it looks for me:    As you can see, I am missing the switch to turn it on or off? Why is it missing? I know that just yesterday, it was available and I turned it off. What can I do to fix it? Ubuntu Server 20.04 Nvidia Driver Dependencies I had a hard time installing Nvidia drivers in a fresh install of Ubuntu 20.04.  Installing via sudo apt install nvidia-driver-430 resulted in a list of 542 packages to install.  I ended up spending a bit of manual effort to get the Nvidia-provided driver installed without nearly so many dependencies (only had to install gcc and make).  Is this massive number of dependencies normal for Ubuntu Server?  I did a very vanilla install without the GUI.  Reddit suggested I ask here, as their opinion is that I should just install from the default repos, but I felt that so many packages was absurd just to install a driver.  Edit for clarity: installing the nvidia-driver-430 package appears to install the entire Gnome shell, which I feel is unnecessary on a server. Prove $e^x - e^y \leq e |x-y|$ for $x$ belonging to $[0,1]$ I'm not sure how to go about this. Does it involve using MVT?  I got as far as saying $e = \frac{e^x - e^y}{x-y}$. Is it acceptable to insult god in a user profile? Like always I hang around in Stack Overflow's chatrooms. Today, someone posted a link to his new "reloaded" user profile.  Along the lines I read in Arabic "god is a pig". So I asked him to remove it:     Me: I have a lot of respect towards you because of your knowledge but what you wrote there in Arabic is offensive. Could you remove it please?   OP: if it were in English, would it be equally offensive?   I will write it in Dutch because you ask it so kindly.   Me: yeah, I mean what's your goal? You're just seeding hatred   OP: It is an experiment.   After that, the user changed it to Dutch.  My question is: are such statements acceptable by Stack Exchange's standards? If not, should I flag one of his posts like stated ? If yes, could you state why?  My answers to possible questions:   This happened on SO, why don't you post it on MSO?   This happened on SO but I think it's applicable to all SE sites.  Why didn't you link the user or the chat conversation?   I want the user to remain anonymous unless he or she chooses to reveal him/her self. I will give the user a link to this question  Why do you care?   I find it offensive, not only to my religion but to any religion that believes in god. I posted this question to know what you guys and girls think about this. I live by the rules, so if it's acceptable by SE then so be it and I won't bother you again.  If you don't like it then move on.   I know that this is not a mosque/church/temple and that swearing  to a certain degree. But I don't see the point in insulting god, a religion or a race in a public profile. More over, it's not even built on arguments. I want to make it so I always have 50 entities in an area. So when 1 dies/despawns/leaves the area I want it to detect that and summon in a new entity, and yes I do want them to die/despawn/leave the area so preventing those things is not an option. Deriving Newton's Third Law from homogeneity of Space How to understand the LaTeX warning “there were undefined references”? What is the list of keys and their corresponding wins?  I have it listing that the highest number of wins I've had in arena is a Champion key, but it doesn't say how many wins it was.