Added winning condition and game over dialog