Use next rather than rest to avoid lazy stack overflows

This occurred when over 692 moves were applied in a row.
Reformatting
Check whether cells are available before spawning

This fixes a bug where move-and-spawn tried to choose a random element
from an empty list (of available cells).
Add function to check whether there are any available moves
Change example to be a winning game