only ask for saving if the last save is dirty.

also i accidentally pressed the autoformat button and i'm fine with
releasing the game including my earlier commits under this license (no
idea how personal messages work here).

also i removed GetNeighbors as my algorithm works without it.