Fix infinite loop when neither side has valid move

If neither side can move while unoccupied squares still exist iagno
goes into an infinite loop.

This is a fix for bug https://bugzilla.gnome.org/show_bug.cgi?id=701122