Fixed the winner when starting with a wrong configuration
Fixing end conditions for the game