added winning logic to exit game