Added a game ending condition if there are no moves, still needs some tweaking