added win detection to Gui.java