added win condition and fixed final bugs with round restart